]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: avoid compiler warning on shadowed name
authorJean-Baptiste Rouault <jean-baptiste.rouault@diateam.net>
Wed, 9 Apr 2014 06:50:24 +0000 (08:50 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 9 Apr 2014 07:05:42 +0000 (09:05 +0200)
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

index 74ad15c8a17d7749bfcff8f09b45ea9e63e25357..bfdee8cf41f135cfe1581a574536f1cfea91c8f0 100644 (file)
@@ -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",