qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 3/4] block: iscsi build fix if LIBISCSI_FEATURE_IOVEC


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 3/4] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
Date: Tue, 20 May 2014 20:14:41 +0200

From: Jeff Cody <address@hidden>

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>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 block/iscsi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index 65bf97d..1b4af77 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)
 {
@@ -393,9 +394,6 @@ static bool iscsi_allocationmap_is_allocated(IscsiLun 
*iscsilun,
                            sector_num / iscsilun->cluster_sectors) == size);
 }
 
-
-#if defined(LIBISCSI_FEATURE_IOVECTOR)
-
 static int64_t coroutine_fn iscsi_co_get_block_status(BlockDriverState *bs,
                                                   int64_t sector_num,
                                                   int nb_sectors, int *pnum)
-- 
1.8.3.1





reply via email to

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