Re: [PATCH] build: fix 32-bit test failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/21/2011 10:26 AM, Eric Blake wrote:
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.
---

Pushing under the build-breaker rule.

  tests/hashtest.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/hashtest.c b/tests/hashtest.c
index dff0181..722b44c 100644
--- a/tests/hashtest.c
+++ b/tests/hashtest.c
@@ -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;

ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]