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 <s...@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


Reply via email to