mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
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:
parent
0ed8f754c5
commit
9b1056ef0e
@ -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])) {
|
||||
|
Loading…
Reference in New Issue
Block a user