From 4b555b5a5451e5e46f5f78e481012b0f6311281d Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Thu, 6 Aug 2015 09:00:48 +0000 Subject: [PATCH] Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15501 --- coregrind/m_sigframe/sigframe-amd64-darwin.c | 2 +- coregrind/m_sigframe/sigframe-amd64-linux.c | 6 +++--- coregrind/m_sigframe/sigframe-arm-linux.c | 2 +- coregrind/m_sigframe/sigframe-arm64-linux.c | 2 +- coregrind/m_sigframe/sigframe-common.c | 2 +- coregrind/m_sigframe/sigframe-mips32-linux.c | 2 +- coregrind/m_sigframe/sigframe-mips64-linux.c | 2 +- coregrind/m_sigframe/sigframe-ppc32-linux.c | 6 +++--- coregrind/m_sigframe/sigframe-ppc64-linux.c | 4 ++-- coregrind/m_sigframe/sigframe-s390x-linux.c | 6 +++--- coregrind/m_sigframe/sigframe-solaris.c | 4 ++-- coregrind/m_sigframe/sigframe-tilegx-linux.c | 6 +++--- coregrind/m_sigframe/sigframe-x86-darwin.c | 4 ++-- coregrind/m_sigframe/sigframe-x86-linux.c | 6 +++--- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/coregrind/m_sigframe/sigframe-amd64-darwin.c b/coregrind/m_sigframe/sigframe-amd64-darwin.c index 803526b6cb..f42641086e 100644 --- a/coregrind/m_sigframe/sigframe-amd64-darwin.c +++ b/coregrind/m_sigframe/sigframe-amd64-darwin.c @@ -222,7 +222,7 @@ void VG_(sigframe_create) ( ThreadId tid, if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "sigframe_create (thread %d): " + "sigframe_create (thread %u): " "next RIP=%#lx, next RSP=%#lx\n", tid, (Addr)handler, (Addr)frame ); } diff --git a/coregrind/m_sigframe/sigframe-amd64-linux.c b/coregrind/m_sigframe/sigframe-amd64-linux.c index 761f9b428e..adb86bca3f 100644 --- a/coregrind/m_sigframe/sigframe-amd64-linux.c +++ b/coregrind/m_sigframe/sigframe-amd64-linux.c @@ -494,7 +494,7 @@ void VG_(sigframe_create)( ThreadId tid, if (0) VG_(printf)("pushed signal frame; %%RSP now = %#lx, " "next %%RIP = %#llx, status=%d\n", - rsp, tst->arch.vex.guest_RIP, tst->status); + rsp, tst->arch.vex.guest_RIP, (Int)tst->status); } @@ -510,7 +510,7 @@ Bool restore_vg_sigframe ( ThreadState *tst, { if (frame->magicPI != 0x31415927 || frame->magicE != 0x27182818) { - VG_(message)(Vg_UserMsg, "Thread %d return signal frame " + VG_(message)(Vg_UserMsg, "Thread %u return signal frame " "corrupted. Killing process.\n", tst->tid); VG_(set_default_handler)(VKI_SIGSEGV); @@ -594,7 +594,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)( Vg_DebugMsg, - "VG_(signal_return) (thread %d): isRT=%d valid magic; RIP=%#llx\n", + "VG_(signal_return) (thread %u): isRT=%d valid magic; RIP=%#llx\n", tid, isRT, tst->arch.vex.guest_RIP); /* tell the tools */ diff --git a/coregrind/m_sigframe/sigframe-arm-linux.c b/coregrind/m_sigframe/sigframe-arm-linux.c index 01dbfbe6b5..07ac938267 100644 --- a/coregrind/m_sigframe/sigframe-arm-linux.c +++ b/coregrind/m_sigframe/sigframe-arm-linux.c @@ -310,7 +310,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "vg_pop_signal_frame (thread %d): " + "vg_pop_signal_frame (thread %u): " "isRT=%d valid magic; PC=%#x\n", tid, has_siginfo, tst->arch.vex.guest_R15T); diff --git a/coregrind/m_sigframe/sigframe-arm64-linux.c b/coregrind/m_sigframe/sigframe-arm64-linux.c index c248585ee5..0d0cc2a7e6 100644 --- a/coregrind/m_sigframe/sigframe-arm64-linux.c +++ b/coregrind/m_sigframe/sigframe-arm64-linux.c @@ -283,7 +283,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "vg_pop_signal_frame (thread %d): " + "vg_pop_signal_frame (thread %u): " "isRT=%d valid magic; PC=%#llx\n", tid, has_siginfo, tst->arch.vex.guest_PC); diff --git a/coregrind/m_sigframe/sigframe-common.c b/coregrind/m_sigframe/sigframe-common.c index 97419d6d6a..5e5eaf69d5 100644 --- a/coregrind/m_sigframe/sigframe-common.c +++ b/coregrind/m_sigframe/sigframe-common.c @@ -83,7 +83,7 @@ Bool ML_(sf_maybe_extend_stack) ( const ThreadState *tst, Addr addr, if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW) { VG_(umsg)("Can't extend stack to %#lx during signal delivery for " - "thread %d:\n", addr, tid); + "thread %u:\n", addr, tid); if (stackseg == NULL) VG_(umsg)(" no stack segment\n"); else diff --git a/coregrind/m_sigframe/sigframe-mips32-linux.c b/coregrind/m_sigframe/sigframe-mips32-linux.c index 1e4f9ac898..d6e76b1d6a 100644 --- a/coregrind/m_sigframe/sigframe-mips32-linux.c +++ b/coregrind/m_sigframe/sigframe-mips32-linux.c @@ -339,7 +339,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) VG_TRACK(die_mem_stack_signal, sp, frame_size); if (VG_(clo_trace_signals)) VG_(message)( Vg_DebugMsg, - "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n", + "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n", tid, isRT, tst->arch.vex.guest_PC); /* tell the tools */ VG_TRACK( post_deliver_signal, tid, sigNo ); diff --git a/coregrind/m_sigframe/sigframe-mips64-linux.c b/coregrind/m_sigframe/sigframe-mips64-linux.c index c1f26370bf..04e0733806 100644 --- a/coregrind/m_sigframe/sigframe-mips64-linux.c +++ b/coregrind/m_sigframe/sigframe-mips64-linux.c @@ -266,7 +266,7 @@ void VG_(sigframe_destroy) ( ThreadId tid, Bool isRT ) VG_TRACK(die_mem_stack_signal, sp, frame_size); if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#llx\n", + "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#llx\n", tid, isRT, tst->arch.vex.guest_PC); /* tell the tools */ VG_TRACK( post_deliver_signal, tid, sigNo ); diff --git a/coregrind/m_sigframe/sigframe-ppc32-linux.c b/coregrind/m_sigframe/sigframe-ppc32-linux.c index 504480e705..881234ab8e 100644 --- a/coregrind/m_sigframe/sigframe-ppc32-linux.c +++ b/coregrind/m_sigframe/sigframe-ppc32-linux.c @@ -752,7 +752,7 @@ void VG_(sigframe_create)( ThreadId tid, if (0) VG_(printf)("pushed signal frame; %%R1 now = %#lx, " "next %%CIA = %#x, status=%d\n", - sp, tst->arch.vex.guest_CIA, tst->status); + sp, tst->arch.vex.guest_CIA, (Int)tst->status); } @@ -901,7 +901,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "vg_pop_signal_frame (thread %d): " + "vg_pop_signal_frame (thread %u): " "isRT=%d valid magic; EIP=%#x\n", tid, has_siginfo, tst->arch.vex.guest_CIA); @@ -928,7 +928,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) //.. if (VG_(clo_trace_signals)) //.. VG_(message)( //.. Vg_DebugMsg, -//.. "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%p", +//.. "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%p", //.. tid, isRT, tst->arch.vex.guest_EIP); //.. //.. /* tell the tools */ diff --git a/coregrind/m_sigframe/sigframe-ppc64-linux.c b/coregrind/m_sigframe/sigframe-ppc64-linux.c index 5a7fa897c5..a58c2d4ee4 100644 --- a/coregrind/m_sigframe/sigframe-ppc64-linux.c +++ b/coregrind/m_sigframe/sigframe-ppc64-linux.c @@ -279,7 +279,7 @@ void VG_(sigframe_create)( ThreadId tid, if (0) VG_(printf)("pushed signal frame; %%R1 now = %#lx, " "next %%CIA = %#llx, status=%d\n", - sp, tst->arch.vex.guest_CIA, tst->status); + sp, tst->arch.vex.guest_CIA, (Int)tst->status); } @@ -345,7 +345,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "vg_pop_signal_frame (thread %d): isRT=%d " + "vg_pop_signal_frame (thread %u): isRT=%d " "valid magic; EIP=%#llx\n", tid, has_siginfo, tst->arch.vex.guest_CIA); diff --git a/coregrind/m_sigframe/sigframe-s390x-linux.c b/coregrind/m_sigframe/sigframe-s390x-linux.c index 2e1ad0ced5..e0cd419916 100644 --- a/coregrind/m_sigframe/sigframe-s390x-linux.c +++ b/coregrind/m_sigframe/sigframe-s390x-linux.c @@ -449,7 +449,7 @@ Bool restore_vg_sigframe ( ThreadState *tst, { if (frame->magicPI != 0x31415927 || frame->magicE != 0x27182818) { - VG_(message)(Vg_UserMsg, "Thread %d return signal frame " + VG_(message)(Vg_UserMsg, "Thread %u return signal frame " "corrupted. Killing process.\n", tst->tid); VG_(set_default_handler)(VKI_SIGSEGV); @@ -495,7 +495,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) Addr sp; ThreadState* tst; SizeT size; - Int sigNo; + Int sigNo; tst = VG_(get_ThreadState)(tid); @@ -515,7 +515,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)( Vg_DebugMsg, - "VG_(sigframe_destroy) (thread %d): isRT=%d valid magic; IP=%#llx\n", + "VG_(sigframe_destroy) (thread %u): isRT=%d valid magic; IP=%#llx\n", tid, isRT, tst->arch.vex.guest_IA); /* tell the tools */ diff --git a/coregrind/m_sigframe/sigframe-solaris.c b/coregrind/m_sigframe/sigframe-solaris.c index 2e28bd5632..5f3b656209 100644 --- a/coregrind/m_sigframe/sigframe-solaris.c +++ b/coregrind/m_sigframe/sigframe-solaris.c @@ -221,7 +221,7 @@ void VG_(sigframe_create)(ThreadId tid, Bool on_altstack, if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "sigframe_create (thread %d): next IP=%#lx, " + "sigframe_create (thread %u): next IP=%#lx, " "next SP=%#lx\n", tid, (Addr)handler, (Addr)frame); } @@ -256,7 +256,7 @@ void VG_(sigframe_return)(ThreadId tid, const vki_ucontext_t *uc) /* Returning from a signal handler. */ if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "sigframe_return (thread %d): IP=%#lx\n", + "sigframe_return (thread %u): IP=%#lx\n", tid, VG_(get_IP)(tid)); /* Tell the tool. */ diff --git a/coregrind/m_sigframe/sigframe-tilegx-linux.c b/coregrind/m_sigframe/sigframe-tilegx-linux.c index 4d4fc94c9e..f57dd077ab 100644 --- a/coregrind/m_sigframe/sigframe-tilegx-linux.c +++ b/coregrind/m_sigframe/sigframe-tilegx-linux.c @@ -239,7 +239,7 @@ void VG_(sigframe_create)( ThreadId tid, if (0) VG_(printf)("pushed signal frame; sp now = %lx, " "next %pc = %lx, status=%d\n", - (Addr)frame, tst->arch.vex.guest_pc, tst->status); + (Addr)frame, tst->arch.vex.guest_pc, (Int)tst->status); } /* EXPORTED */ @@ -264,7 +264,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (0) VG_(printf)("destroy signal frame; sp = %lx, " " %pc = %lx, status=%d\n", - (Addr)frame, tst->arch.vex.guest_pc, tst->status); + (Addr)frame, tst->arch.vex.guest_pc, (Int)tst->status); frame_size = sizeof(*frame); mc = &ucp->uc_mcontext; @@ -339,7 +339,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) VG_TRACK(die_mem_stack_signal, sp, frame_size); if (VG_(clo_trace_signals)) VG_(message)( Vg_DebugMsg, - "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n", + "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n", tid, isRT, tst->arch.vex.guest_pc); /* tell the tools */ VG_TRACK( post_deliver_signal, tid, sigNo ); diff --git a/coregrind/m_sigframe/sigframe-x86-darwin.c b/coregrind/m_sigframe/sigframe-x86-darwin.c index 8e77f6006d..789e7f17fa 100644 --- a/coregrind/m_sigframe/sigframe-x86-darwin.c +++ b/coregrind/m_sigframe/sigframe-x86-darwin.c @@ -209,7 +209,7 @@ void VG_(sigframe_create) ( ThreadId tid, if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "sigframe_create (thread %d): " + "sigframe_create (thread %u): " "next EIP=%#lx, next ESP=%#lx\n", tid, (Addr)handler, (Addr)frame ); } @@ -252,7 +252,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)(Vg_DebugMsg, - "sigframe_destroy (thread %d): " + "sigframe_destroy (thread %u): " "valid magic; next EIP=%#x\n", tid, tst->arch.vex.guest_EIP); diff --git a/coregrind/m_sigframe/sigframe-x86-linux.c b/coregrind/m_sigframe/sigframe-x86-linux.c index ce33f7356b..43111116da 100644 --- a/coregrind/m_sigframe/sigframe-x86-linux.c +++ b/coregrind/m_sigframe/sigframe-x86-linux.c @@ -567,7 +567,7 @@ void VG_(sigframe_create)( ThreadId tid, if (0) VG_(printf)("pushed signal frame; %%ESP now = %#lx, " "next %%EIP = %#x, status=%d\n", - esp, tst->arch.vex.guest_EIP, tst->status); + esp, tst->arch.vex.guest_EIP, (Int)tst->status); } @@ -583,7 +583,7 @@ Bool restore_vg_sigframe ( ThreadState *tst, { if (frame->magicPI != 0x31415927 || frame->magicE != 0x27182818) { - VG_(message)(Vg_UserMsg, "Thread %d return signal frame " + VG_(message)(Vg_UserMsg, "Thread %u return signal frame " "corrupted. Killing process.\n", tst->tid); VG_(set_default_handler)(VKI_SIGSEGV); @@ -673,7 +673,7 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) if (VG_(clo_trace_signals)) VG_(message)( Vg_DebugMsg, - "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n", + "VG_(signal_return) (thread %u): isRT=%d valid magic; EIP=%#x\n", tid, isRT, tst->arch.vex.guest_EIP); /* tell the tools */ -- 2.47.2