diff mbox

iscsi: Fix compile error

Message ID 1400644197-6179-1-git-send-email-aik@ozlabs.ru
State New
Headers show

Commit Message

Alexey Kardashevskiy May 21, 2014, 3:49 a.m. UTC
This fixes compile error when LIBISCSI_FEATURE_IOVECTOR is not defined:

block/iscsi.c|384 col 13| error: 'iscsi_allocationmap_is_allocated' defined but not used [-Werror=unused-f    unction]

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 block/iscsi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Alexey Kardashevskiy May 21, 2014, 3:53 a.m. UTC | #1
On 05/21/2014 01:49 PM, Alexey Kardashevskiy wrote:
> This fixes compile error when LIBISCSI_FEATURE_IOVECTOR is not defined:
> 
> block/iscsi.c|384 col 13| error: 'iscsi_allocationmap_is_allocated' defined but not used [-Werror=unused-f    unction]

Oops, never mind. Fix is already on its way.


> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>  block/iscsi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/block/iscsi.c b/block/iscsi.c
> index d649424..5b3f459 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -380,6 +380,7 @@ retry:
>      return 0;
>  }
>  
> +#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)
>
diff mbox

Patch

diff --git a/block/iscsi.c b/block/iscsi.c
index d649424..5b3f459 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -380,6 +380,7 @@  retry:
     return 0;
 }
 
+#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)