pq-crystals/kyber

Many compiler warnings with GCC 11 / -Wall

thomwiggers opened this issue · 0 comments

Compiling with GCC 11 leads to many compiler warnings like:

aes256ctr.c:420:19: warning: array subscript 117 is outside array bounds of ‘uint64_t[64]’ {aka ‘long unsigned int[64]’} [-Warray-bounds]
  420 |         q[5] ^= sk[5];
      |                   ^

aes256ctr.c:557:64: warning: argument 3 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Warray-parameter=]
  557 | void aes256ctr_prf(uint8_t *out, size_t outlen, const uint8_t *key, const uint8_t *nonce)
      |                                                 ~~~~~~~~~~~~~~~^~~
In file included from aes256ctr.c:27:
aes256ctr.h:19:34: note: previously declared as an array ‘const uint8_t[32]’ {aka ‘const unsigned char[32]’}
   19 |                    const uint8_t key[32],
      |                    ~~~~~~~~~~~~~~^~~~~~~