This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] remote-e7000.c warnings


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]