From nobody Sun May 5 08:43:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 149062053465694.24495961247226; Mon, 27 Mar 2017 06:15:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D53280514; Mon, 27 Mar 2017 13:15:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00251187BB; Mon, 27 Mar 2017 13:15:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5931618523CA; Mon, 27 Mar 2017 13:15:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RDFVC8025094 for ; Mon, 27 Mar 2017 09:15:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8D6F0A68EE; Mon, 27 Mar 2017 13:15:31 +0000 (UTC) Received: from red.redhat.com (ovpn-122-200.rdu2.redhat.com [10.10.122.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3513317D3D for ; Mon, 27 Mar 2017 13:15:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2D53280514 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2D53280514 From: Eric Blake To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 08:15:28 -0500 Message-Id: <20170327131528.7727-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] util: fix build on RHEL 6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 27 Mar 2017 13:15:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We keep forgetting that older setups don't like 'index': CC util/libvirt_util_la-virsysinfo.lo cc1: warnings being treated as errors util/virstoragefile.c: In function 'virStorageSourceFindByNodeName': util/virstoragefile.c:3804: error: declaration of 'index' shadows a global = declaration [-Wshadow] /usr/include/string.h:489: error: shadowed declaration is here [-Wshadow] Signed-off-by: Eric Blake --- Pushing under the build-breaker rule src/util/virstoragefile.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 0ac7079..22cdb83 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1,7 +1,7 @@ /* * virstoragefile.c: file utility functions for FS storage backend * - * Copyright (C) 2007-2014, 2016 Red Hat, Inc. + * Copyright (C) 2007-2017 Red Hat, Inc. * Copyright (C) 2007-2008 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -3801,23 +3801,23 @@ virStorageSourceIsRelative(virStorageSourcePtr src) virStorageSourcePtr virStorageSourceFindByNodeName(virStorageSourcePtr top, const char *nodeName, - unsigned int *index) + unsigned int *idx) { virStorageSourcePtr tmp; - if (index) - *index =3D 0; + if (idx) + *idx =3D 0; for (tmp =3D top; tmp; tmp =3D tmp->backingStore) { if ((tmp->nodeformat && STREQ(tmp->nodeformat, nodeName)) || (tmp->nodebacking && STREQ(tmp->nodebacking, nodeName))) return tmp; - if (index) - (*index)++; + if (idx) + (*idx)++; } - if (index) - *index =3D 0; + if (idx) + *idx =3D 0; return NULL; } --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list