From: Bart Van Assche Date: Thu, 1 Nov 2018 15:25:27 +0000 (-0700) Subject: src/sg/syzkaller1.c: Fix a 32-bit compiler warning X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9a0064628b09f1463c193ac233bef0c4ca32fcca;p=users%2Fsagi%2Fblktests.git src/sg/syzkaller1.c: Fix a 32-bit compiler warning Avoid that clang reports the following warning when building in 32-bit mode: sg/syzkaller1.c:405:34: error: implicit conversion from 'unsigned long long' to 'uintptr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion] 0x32ul, 0xfffffffffffffffful, 0x0ul, 0, 0, 0); ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Bart Van Assche --- diff --git a/src/sg/syzkaller1.c b/src/sg/syzkaller1.c index 788ed2c..60bd9a6 100644 --- a/src/sg/syzkaller1.c +++ b/src/sg/syzkaller1.c @@ -402,7 +402,7 @@ void test() { memset(r, -1, sizeof(r)); r[0] = execute_syscall(__NR_mmap, 0x20000000ul, 0x5000ul, 0x3ul, - 0x32ul, 0xfffffffffffffffful, 0x0ul, 0, 0, 0); + 0x32ul, (uintptr_t)(-1ul), 0x0ul, 0, 0, 0); NONFAILING(memcpy((void*)0x20000000, dev_sg, strlen(dev_sg))); r[2] = execute_syscall(__NR_syz_open_dev, 0x20000000ul, 0x0ul, 0x2ul,