[RFA/RFC] Warnings in elf.c (mips-irix)
Joel Brobecker
brobecker@adacore.com
Tue Mar 29 15:16:00 GMT 2005
On Tue, Mar 29, 2005 at 12:00:29AM -0500, Daniel Jacobowitz wrote:
> On Mon, Mar 28, 2005 at 08:31:56PM -0800, Joel Brobecker wrote:
> > I think that upcasting to long is the most cost-effective approach.
> > Opinions?
>
> I agree.
OK, so I suggest the following patch:
2005-03-29 Joel Brobecker <brobecker@gnat.com>
* elf.c (elfcore_grok_nto_status): Print tid as long.
(elfcore_grok_nto_regs): Likewise.
Builds on mips-irix. I also ran the GDB testsuite just in case, but
I realize that this is not exercized on IRIX, just with QNX systems.
Seems pretty obvious, though.
OK to apply?
Thanks,
--
Joel
-------------- next part --------------
Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.271
diff -u -p -r1.271 elf.c
--- elf.c 20 Mar 2005 23:36:15 -0000 1.271
+++ elf.c 29 Mar 2005 08:28:06 -0000
@@ -7335,7 +7335,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_
elf_tdata (abfd)->core_lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
- sprintf (buf, ".qnx_core_status/%d", *tid);
+ sprintf (buf, ".qnx_core_status/%ld", (long) *tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -7365,7 +7365,7 @@ elfcore_grok_nto_regs (bfd *abfd,
asection *sect;
/* Make a "(base)/%d" section. */
- sprintf (buf, "%s/%d", base, tid);
+ sprintf (buf, "%s/%ld", base, (long) tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
More information about the Binutils
mailing list