X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/9b1663a5574182a66c6de8ad2fce7b3e4cbf277b..23bbea75793621e6b21fbb13c00d8223113cf7b5:/symm/square.c diff --git a/symm/square.c b/symm/square.c index 73b22bb..888d495 100644 --- a/symm/square.c +++ b/symm/square.c @@ -31,6 +31,7 @@ #include #include +#include #include "blkc.h" #include "gcipher.h" @@ -94,20 +95,11 @@ void square_init(square_ctx *k, const void *buf, size_t sz) /* --- GCC complains about an out-of-bounds subscript here --- * * - * This is impossible. Thanks to @KSZ_ASSERT@, we know that @sz <= 16@ and - * hence @i <= nk <= 4@; but @SQUARE_KWORDS == 36@. + * This is impossible. Thanks to @KSZ_ASSERT@, we know that @4 <= sz <= + * 16@ and hence @1 <= i <= nk <= 4@; but @SQUARE_KWORDS == 36@. */ -#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Warray-bounds" -#endif - - ww = kk[i - 1]; - -#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) -# pragma GCC diagnostic pop -#endif + ww = MUFFLE_WARNINGS_EXPR(GCC_WARNING("-Warray-bounds"), kk[i - 1]); /* --- Expand this material to fill the rest of the table --- */