math/mpreduce.h: Missing include files.
[u/mdw/catacomb] / symm / square.c
index f3056de..888d495 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 
 #include <mLib/bits.h>
+#include <mLib/macros.h>
 
 #include "blkc.h"
 #include "gcipher.h"
@@ -92,10 +93,17 @@ void square_init(square_ctx *k, const void *buf, size_t sz)
   }
   nr = 8;
 
+  /* --- GCC complains about an out-of-bounds subscript here --- *
+   *
+   * This is impossible.  Thanks to @KSZ_ASSERT@, we know that @4 <= sz <=
+   * 16@ and hence @1 <= i <= nk <= 4@; but @SQUARE_KWORDS == 36@.
+   */
+
+  ww = MUFFLE_WARNINGS_EXPR(GCC_WARNING("-Warray-bounds"), kk[i - 1]);
+
   /* --- Expand this material to fill the rest of the table --- */
 
   nw = (nr + 1) * 4;
-  ww = kk[i - 1];
   p = RCON;
   for (; i < nw; i++) {
     uint32 w = kk[i - nk];