From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wmf83-0003dg-8k for qemu-devel@nongnu.org; Tue, 20 May 2014 04:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wmf7s-0005zp-BF for qemu-devel@nongnu.org; Tue, 20 May 2014 04:10:31 -0400 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:59893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wmf7s-0005zN-6K for qemu-devel@nongnu.org; Tue, 20 May 2014 04:10:20 -0400 Received: by mail-qc0-f179.google.com with SMTP id x3so175030qcv.10 for ; Tue, 20 May 2014 01:10:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <537B0DE6.4080608@redhat.com> Date: Tue, 20 May 2014 10:10:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <7574375ef9b855f3e9556c929c86c0b85a2c4af9.1400533515.git.jcody@redhat.com> In-Reply-To: <7574375ef9b855f3e9556c929c86c0b85a2c4af9.1400533515.git.jcody@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pl@kamp.de, stefanha@redhat.com Il 19/05/2014 23:13, Jeff Cody ha scritto: > 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 > --- > 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) The new #endif and the subsequent #if can be elided. Applied to scsi-next with this change, thanks. Paolo