* [Qemu-devel] [PATCH] block: Fix compiler warning (unused local function)
@ 2014-05-20 5:08 Stefan Weil
2014-05-20 8:48 ` Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2014-05-20 5:08 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Ronnie Sahlberg, qemu-trivial, Stefan Weil,
Peter Lieven, Stefan Hajnoczi, Paolo Bonzini
Warning from gcc:
block/iscsi.c:384:13: error:
‘iscsi_allocationmap_is_allocated’ defined but not used [-Werror=unused-function]
The function is only used if LIBISCSI_FEATURE_IOVECTOR is defined.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
block/iscsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index d649424..edb8e1e 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -381,6 +381,7 @@ retry:
}
+#if defined(LIBISCSI_FEATURE_IOVECTOR)
static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
int64_t sector_num, int nb_sectors)
{
@@ -392,6 +393,7 @@ static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
return !(find_next_bit(iscsilun->allocationmap, size,
sector_num / iscsilun->cluster_sectors) == size);
}
+#endif /* LIBISCSI_FEATURE_IOVECTOR */
#if defined(LIBISCSI_FEATURE_IOVECTOR)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block: Fix compiler warning (unused local function)
2014-05-20 5:08 [Qemu-devel] [PATCH] block: Fix compiler warning (unused local function) Stefan Weil
@ 2014-05-20 8:48 ` Kevin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2014-05-20 8:48 UTC (permalink / raw)
To: Stefan Weil
Cc: Ronnie Sahlberg, qemu-trivial, Peter Lieven, qemu-devel,
Stefan Hajnoczi, Paolo Bonzini
Am 20.05.2014 um 07:08 hat Stefan Weil geschrieben:
> Warning from gcc:
>
> block/iscsi.c:384:13: error:
> ‘iscsi_allocationmap_is_allocated’ defined but not used [-Werror=unused-function]
>
> The function is only used if LIBISCSI_FEATURE_IOVECTOR is defined.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Looks like a duplicate of Jeff's "block: iscsi build fix if
LIBISCSI_FEATURE_IOVECTOR is not defined", which Paolo already applied
to his queue.
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-20 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 5:08 [Qemu-devel] [PATCH] block: Fix compiler warning (unused local function) Stefan Weil
2014-05-20 8:48 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).