]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: fix 32-bit test failure
authorEric Blake <eblake@redhat.com>
Thu, 21 Apr 2011 14:23:59 +0000 (08:23 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 21 Apr 2011 14:23:59 +0000 (08:23 -0600)
ARRAY_CARDINALITY is typed as size_t, not long; this matters on 32-bit
platforms:

hashtest.c: In function 'testHashRemoveForEach':
hashtest.c:114: error: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat]

* tests/hashtest.c (testHashRemoveForEach): Use correct format.

tests/hashtest.c

index dff0181665a08b886c87e457f0f46c482c56bf4a..722b44c01cf79a3726eafe741fbd99cbfa26d3ab 100644 (file)
@@ -112,7 +112,7 @@ testHashRemoveForEach(const void *data)
     if (count != ARRAY_CARDINALITY(uuids)) {
         if (virTestGetVerbose()) {
             testError("\nvirHashForEach didn't go through all entries,"
-                      " %d != %lu\n",
+                      " %d != %zu\n",
                       count, ARRAY_CARDINALITY(uuids));
         }
         goto cleanup;