configure: Add void* cast to avoid bogus warning
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 1 May 2017 18:48:16 +0000 (21:48 +0300)
committerJens Axboe <axboe@fb.com>
Mon, 1 May 2017 20:47:16 +0000 (14:47 -0600)
This warning has nothing to do with what the code is trying to test.
This test code should keep it volatile, so cast to void* to silence
a warning on discarding volatile.

--
 # uname
 Linux
 # grep memset config.log -A2 | head -3
 /tmp/fio-conf-15226-60011-1419.c:6:10: warning: passing argument 1 of 'memset' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
    memset(&cid, 0, sizeof(cid));
           ^

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
configure

index 255fa2217270f8eb050d3d92b052dc9a3656785b..b49ffc1ece74562a71c3e4ab3760e2a5abd65991 100755 (executable)
--- a/configure
+++ b/configure
@@ -908,7 +908,7 @@ cat > $TMPC << EOF
 int main(int argc, char **argv)
 {
   volatile clockid_t cid;
-  memset(&cid, 0, sizeof(cid));
+  memset((void*)&cid, 0, sizeof(cid));
   return 0;
 }
 EOF