This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 07/26] ppc-linux-tdep.c: Wrong signness for buffer holding instructions.
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 11 Apr 2013 23:59:47 +0100
- Subject: [PATCH 07/26] ppc-linux-tdep.c: Wrong signness for buffer holding instructions.
- References: <20130411225847 dot 16791 dot 29283 dot stgit at brno dot lan>
There seems to be no reason for this buffer to be signed. We pass it
around to functions expecting it to be unsigned (which triggers
-Wpointer-sign warnings).
gdb/
2013-04-11 Pedro Alves <palves@redhat.com>
* ppc-linux-tdep.c (ppc_skip_trampoline_code): Change local
'insnbuf' buffer type to unsigned int[].
---
gdb/ppc-linux-tdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 6895562..25b6c0b 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -355,7 +355,7 @@ powerpc_linux_in_dynsym_resolve_code (CORE_ADDR pc)
static CORE_ADDR
ppc_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
{
- int insnbuf[POWERPC32_PLT_STUB_LEN];
+ unsigned int insnbuf[POWERPC32_PLT_STUB_LEN];
struct gdbarch *gdbarch = get_frame_arch (frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);