mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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 <eblake@redhat.com>
This commit is contained in:
parent
6d0a617568
commit
fe19043485
@ -14937,7 +14937,7 @@ static int
|
|||||||
virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
||||||
virStorageSourcePtr backingStore,
|
virStorageSourcePtr backingStore,
|
||||||
const char *backingStoreRaw,
|
const char *backingStoreRaw,
|
||||||
unsigned int index)
|
unsigned int idx)
|
||||||
{
|
{
|
||||||
const char *type;
|
const char *type;
|
||||||
const char *format;
|
const char *format;
|
||||||
@ -14965,7 +14965,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virBufferAsprintf(buf, "<backingStore type='%s' index='%u'>\n",
|
virBufferAsprintf(buf, "<backingStore type='%s' index='%u'>\n",
|
||||||
type, index);
|
type, idx);
|
||||||
virBufferAdjustIndent(buf, 2);
|
virBufferAdjustIndent(buf, 2);
|
||||||
|
|
||||||
virBufferAsprintf(buf, "<format type='%s'/>\n", format);
|
virBufferAsprintf(buf, "<format type='%s'/>\n", format);
|
||||||
@ -14973,7 +14973,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
|
|||||||
virDomainDiskBackingStoreFormat(buf,
|
virDomainDiskBackingStoreFormat(buf,
|
||||||
backingStore->backingStore,
|
backingStore->backingStore,
|
||||||
backingStore->backingStoreRaw,
|
backingStore->backingStoreRaw,
|
||||||
index + 1) < 0)
|
idx + 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
virBufferAdjustIndent(buf, -2);
|
virBufferAdjustIndent(buf, -2);
|
||||||
|
Loading…
Reference in New Issue
Block a user