qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] block: Fix compiler warning (unused local functio


From: Stefan Weil
Subject: [Qemu-trivial] [PATCH] block: Fix compiler warning (unused local function)
Date: Tue, 20 May 2014 07:08:34 +0200

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]