From fe190434852c01e79c136732da78a2baeadf3dba Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 24 Apr 2014 15:41:47 -0600 Subject: [PATCH] build: avoid 'index' as variable name Once again, gcc 4.4.7 (hello RHEL) rears its ugly head: conf/domain_conf.c: In function 'virDomainDiskBackingStoreFormat': conf/domain_conf.c:14940: error: declaration of 'index' shadows a global declaration [-Wshadow] /usr/include/string.h:489: error: shadowed declaration is here [-Wshadow] * src/conf/domain_conf.c (virDomainDiskBackingStoreFormat): Pacify older gcc. Signed-off-by: Eric Blake --- src/conf/domain_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a558b1bad7..c655bcf2bc 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14937,7 +14937,7 @@ static int virDomainDiskBackingStoreFormat(virBufferPtr buf, virStorageSourcePtr backingStore, const char *backingStoreRaw, - unsigned int index) + unsigned int idx) { const char *type; const char *format; @@ -14965,7 +14965,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, } virBufferAsprintf(buf, "\n", - type, index); + type, idx); virBufferAdjustIndent(buf, 2); virBufferAsprintf(buf, "\n", format); @@ -14973,7 +14973,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, virDomainDiskBackingStoreFormat(buf, backingStore->backingStore, backingStore->backingStoreRaw, - index + 1) < 0) + idx + 1) < 0) return -1; virBufferAdjustIndent(buf, -2);