From: Tomohiro Kusumi Date: Mon, 1 May 2017 18:48:16 +0000 (+0300) Subject: configure: Add void* cast to avoid bogus warning X-Git-Tag: fio-2.20~15 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7fcad9e1cf089289372cc91a85fba0c7e5978474;p=fio.git configure: Add void* cast to avoid bogus warning 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 Signed-off-by: Jens Axboe --- diff --git a/configure b/configure index 255fa221..b49ffc1e 100755 --- 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