[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR
From: |
Jeff Cody |
Subject: |
[Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined |
Date: |
Mon, 19 May 2014 17:13:06 -0400 |
Commit b03c380 introduced the function
iscsi_allocationmap_is_allocated(), however it is only used within a
code block that is conditionally compiled. This produces a warning
(error with -werror) of "defined but not used" for the the function, if
LIBISCSI_FEATURE_IOVECTOR is not defined.
This wraps iscsi_allocationmap_is_allocated() in the same conditional.
Signed-off-by: Jeff Cody <address@hidden>
---
block/iscsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index d649424..d5548fa 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
#if defined(LIBISCSI_FEATURE_IOVECTOR)
--
1.8.3.1
- [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined,
Jeff Cody <=