fuzz: Fix compile error in simulated glibc rand

When using LWIP_RAND_FOR_FUZZ_SIMULATE_GLIBC:

fuzz_common.c: In function ‘lwip_fuzz_rand’:
fuzz_common.c:683:11: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
  683 |   if (idx >= sizeof(rand_nrs)/sizeof((rand_nrs)[0])) {
      |           ^~
cc1: all warnings being treated as errors
This commit is contained in:
Erik Ekman 2020-06-19 13:24:30 +02:00
parent 0ed8f754c5
commit 9b1056ef0e

View File

@ -677,7 +677,7 @@ u32_t lwip_fuzz_rand(void)
0x19495cff, 0x2ae8944a, 0x625558ec, 0x238e1f29, 0x46e87ccd,
0x3d1b58ba, 0x507ed7ab, 0x2eb141f2, 0x41b71efb, 0x79e2a9e3,
0x7545e146, 0x515f007c, 0x5bd062c2, 0x12200854, 0x4db127f8};
static int idx = 0;
static unsigned idx = 0;
u32_t ret = rand_nrs[idx];
idx++;
if (idx >= sizeof(rand_nrs)/sizeof((rand_nrs)[0])) {