From 479c48f1ddd3679bc6357c0db3686f14cb0ffb3f Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 15 Apr 2008 23:26:58 -0600 Subject: [PATCH] fix printf warning --- src/common.h | 6 ++++-- src/compile.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common.h b/src/common.h index 1db2bd4189..0e4383fab6 100644 --- a/src/common.h +++ b/src/common.h @@ -29,16 +29,18 @@ #ifdef __i386__ # define LD "d" +# define LX "x" +# define LLD "lld" #ifdef __APPLE__ # define ULD "lu" #else # define ULD "u" #endif -# define LLD "lld" #elif defined __x86_64__ # define LD "ld" -# define ULD "lu" +# define LX "lx" # define LLD "ld" +# define ULD "lu" #else # error "Unsupported architecture" #endif diff --git a/src/compile.cpp b/src/compile.cpp index 0678a1d3c6..242a5f2984 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -122,7 +122,7 @@ compareIpToMethodBounds(Thread* t, intptr_t ip, object method) (&singletonValue(t, methodCompiled(t, method), 0)); if (DebugMethodTree) { - fprintf(stderr, "find 0x%lx in (0x%lx,0x%lx)\n", ip, start, + fprintf(stderr, "find 0x%"LX" in (0x%"LX",0x%"LX")\n", ip, start, start + (singletonCount(t, methodCompiled(t, method)) * BytesPerWord)); }