]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
src/sg/syzkaller1.c: Fix a 32-bit compiler warning
authorBart Van Assche <bvanassche@acm.org>
Thu, 1 Nov 2018 15:25:27 +0000 (08:25 -0700)
committerBart Van Assche <bvanassche@acm.org>
Thu, 1 Nov 2018 18:12:04 +0000 (11:12 -0700)
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 <bvanassche@acm.org>
src/sg/syzkaller1.c

index 788ed2c9927ff06b34697f6e04d647159e89181b..60bd9a6166a824d68a619aca2cd2aa67d3888db6 100644 (file)
@@ -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,