From a18c71301363d9accec5c26e8798b2615e68ef05 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Rouault Date: Wed, 9 Apr 2014 08:50:24 +0200 Subject: [PATCH] build: avoid compiler warning on shadowed name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced in commit d1e55de3. virstoragetest.c: In function ‘testStorageChain’: virstoragetest.c:249:10: warning: declaration of ‘abs’ shadows a global declaration [-Wshadow] --- tests/virstoragetest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 74ad15c8a1..bfdee8cf41 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -246,7 +246,7 @@ testStorageChain(const void *args) virStorageFileMetadataPtr elt; size_t i = 0; char *broken = NULL; - bool abs = !!(data->flags & ABS_START); + bool isAbs = !!(data->flags & ABS_START); meta = virStorageFileGetMetadata(data->start, data->format, -1, -1, (data->flags & ALLOW_PROBE) != 0); @@ -292,7 +292,7 @@ testStorageChain(const void *args) goto cleanup; } - expDirectory = abs ? data->files[i]->expDirectoryAbs + expDirectory = isAbs ? data->files[i]->expDirectoryAbs : data->files[i]->expDirectoryRel; if (virAsprintf(&expect, "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d",