From 24eb02da839024418b9e380a047b064b01fd4193 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 13 Nov 2016 22:29:30 +0000 Subject: [PATCH] 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]. --- tests/ioctl_block.c | 2 ++ 1 file changed, 2 insertions(+) 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), -- 2.40.0