[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVE
From: |
Peter Lieven |
Subject: |
Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined |
Date: |
Tue, 20 May 2014 00:12:25 +0200 |
Am 19.05.2014 um 23:13 schrieb 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>
> ---
> 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
>
Thanks for spotting this.
Reviewed-by: Peter Lieven <address@hidden>