ARM: Fix warning

Andrew Haley aph at redhat.com
Mon Jan 23 08:53:18 PST 2012


The Debian builder failed with a warning that I haven't seen. I
think this must be because they're using a different version of
gcc.

/media/dh0/buildbot/icedtea/icedtea6-natty-armv7l-quick/build/openjdk/hotspot/src/cpu/zero/vm/thumb2.cpp: In function 'void* print_address(void*, const char*, void*)':
/media/dh0/buildbot/icedtea/icedtea6-natty-armv7l-quick/build/openjdk/hotspot/src/cpu/zero/vm/thumb2.cpp:953:29: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'void*' [-Werror=format]
cc1plus: all warnings being treated as errors

Fixed thusly: obvious/trivial.

Andrew.


changeset:   2803:6179ebaffe6b
tag:         tip
user:        aph
date:        Mon Jan 23 16:43:01 2012 +0000
summary:     Add cast to silence warning.

diff -r 825402ba63cb -r 6179ebaffe6b ChangeLog
--- a/ChangeLog	Mon Jan 23 09:49:12 2012 -0500
+++ b/ChangeLog	Mon Jan 23 16:43:01 2012 +0000
@@ -1,3 +1,8 @@
+2012-01-23  Andrew Haley  <aph at redhat.com>
+
+	* arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp (print_address): Add
+	cast to silence warning.
+
 2012-01-19  Xerxes R��nby  <xerxes at zafena.se>
 	    Andrew Haley  <aph at redhat.com>

diff -r 825402ba63cb -r 6179ebaffe6b arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp
--- a/arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp	Mon Jan 23 09:49:12 2012 -0500
+++ b/arm_port/hotspot/src/cpu/zero/vm/thumb2.cpp	Mon Jan 23 16:43:01 2012 +0000
@@ -950,7 +950,7 @@
 // where
 static void *print_address(void *, const char *tag, void *data) {
   if (strcmp(tag, "insn") == 0)
-    printf("0x%08x:\t", data);
+    printf("0x%08x:\t", (unsigned int)data);
   return NULL;
 }
 #endif




More information about the distro-pkg-dev mailing list