[PATCH 2/2] hashtabletest: Fix warning: format ‘%ld’ expects argument of type ...
Hans de Goede
hdegoede at redhat.com
Mon Mar 3 00:53:13 PST 2014
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 at redhat.com>
---
test/hashtabletest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/hashtabletest.c b/test/hashtabletest.c
index ceadfa7..86a0c58 100644
--- a/test/hashtabletest.c
+++ b/test/hashtabletest.c
@@ -12,7 +12,7 @@ static void
print_xid(void* ptr, void* v)
{
XID *x = v;
- printf("%ld", *x);
+ printf("%ld", (long)(*x));
}
static void
--
1.9.0
More information about the xorg-devel
mailing list