From: Dmitry V. Levin Date: Sun, 13 Nov 2016 22:29:30 +0000 (+0000) Subject: tests: fix potential compilation warning in ioctl_block.c X-Git-Tag: v4.15~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24eb02da839024418b9e380a047b064b01fd4193;p=strace tests: fix potential compilation warning in ioctl_block.c ioctl_block.c:48: warning: 'init_magic' defined but not used * tests/ioctl_block.c (init_magic): Define only for [BLKTRACESETUP && HAVE_STRUCT_BLK_USER_TRACE_SETUP]. --- diff --git a/tests/ioctl_block.c b/tests/ioctl_block.c index 221a3f14..82b89da9 100644 --- a/tests/ioctl_block.c +++ b/tests/ioctl_block.c @@ -43,6 +43,7 @@ static const unsigned int magic = 0xdeadbeef; static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP static void init_magic(void *addr, const unsigned int size) { @@ -52,6 +53,7 @@ init_magic(void *addr, const unsigned int size) for (; p <= end; ++p) *(unsigned int *) p = magic + (p - (unsigned int *) addr); } +#endif static struct xlat block_argless[] = { XLAT(BLKRRPART),