This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] remote-e7000.c warnings
- To: Elena Zannoni <ezannoni at cygnus dot com>
- Subject: Re: [RFA] remote-e7000.c warnings
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 11 Jul 2001 22:42:43 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <15180.65506.552976.660043@krustylu.cygnus.com>
> This patch removes warnings when building remote-e7000.c. (On Linux
> 7.0) Since this file gets build with target=sh-elf, I was getting
> tired of all the warnings on the screen.
> But then I saw the FIXME in the Makefile, so I am not sure what to do.
> # FIXME: For the SH target, remote-e7000 contains numerous -Wformat
> # warnings. Since the fixes involve modifications to the code that
> # handles the SH remote protocol the changes need to be tested against
> # an SH board before they can be committed. cagney 1999-09-01.
This is me be paranoid :-) If you can find someone to test it then
good, if not, we might as well just bite the bullet and let it go in
anway :-/ It certainly falls under:
``All maintainers can make mechanical (params, spelling, indentation,
multi-arch, -W..., ....) changes to ``maintenance only'' targets.
Please sanity check the change by compiling with one of the listed
targets.''
> - sprintf (buf, ".ER%d %lx\r", regno, read_register (regno));
> + sprintf (buf, ".ER%d %lx\r", regno, (long) read_register (regno));
To think out loud, is:
sprintf (buf, ".ER%d %s\r", regno, phex_nz (read_register (regno), 0);
more portable? I suspect I had that in mind and hence the comment.
enjoy,
Andrew