From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmoZ5-0008OR-F3 for qemu-devel@nongnu.org; Tue, 20 May 2014 14:15:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmoYw-0005Wi-7C for qemu-devel@nongnu.org; Tue, 20 May 2014 14:15:03 -0400 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:39957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmoYw-0005WT-0g for qemu-devel@nongnu.org; Tue, 20 May 2014 14:14:54 -0400 Received: by mail-ee0-f43.google.com with SMTP id d17so867096eek.30 for ; Tue, 20 May 2014 11:14:53 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 20 May 2014 20:14:41 +0200 Message-Id: <1400609682-22166-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1400609682-22166-1-git-send-email-pbonzini@redhat.com> References: <1400609682-22166-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 3/4] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jeff Cody From: Jeff Cody 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 Signed-off-by: Paolo Bonzini --- 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