hashtabletest: Fix warning: format ‘%ld’ expects argument of type ...
authorHans de Goede <hdegoede@redhat.com>
Mon, 3 Mar 2014 08:51:36 +0000 (09:51 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 10 Mar 2014 08:06:57 +0000 (09:06 +0100)
This fixes the following compiler warning:

hashtabletest.c: In function ‘print_xid’:
hashtabletest.c:15:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘XID’ [-Wformat=]
     printf("%ld", *x);
     ^

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
test/hashtabletest.c

index ceadfa7..86a0c58 100644 (file)
@@ -12,7 +12,7 @@ static void
 print_xid(void* ptr, void* v)
 {
     XID *x = v;
-    printf("%ld", *x);
+    printf("%ld", (long)(*x));
 }
 
 static void