* Question about warning in gdb/remote.c
@ 2003-06-30 13:15 Andreas Jaeger
2003-06-30 15:47 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Jaeger @ 2003-06-30 13:15 UTC (permalink / raw)
To: gdb
compiling gdb I get this warning:
/cvs/src-gdb/src/gdb/remote.c:3290: warning: too many arguments for format
What is supposed to happen here? The line is:
error ("Remote register badly formatted: %s\nhere:", buf, p);
Should a %s added for p at the end - or should p get removed?
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about warning in gdb/remote.c
2003-06-30 13:15 Question about warning in gdb/remote.c Andreas Jaeger
@ 2003-06-30 15:47 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2003-06-30 15:47 UTC (permalink / raw)
To: Andreas Jaeger; +Cc: gdb
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
> compiling gdb I get this warning:
> /cvs/src-gdb/src/gdb/remote.c:3290: warning: too many arguments for format
>
> What is supposed to happen here? The line is:
> error ("Remote register badly formatted: %s\nhere:", buf, p);
gcc -Werror -Wformat is ment to not build (but the gcc I used did ... :-?).
> Should a %s added for p at the end - or should p get removed?
It should print `p'. I checked in the attached.
thanks!
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 595 bytes --]
2003-06-30 Andrew Cagney <cagney@redhat.com>
* remote.c (remote_async_wait): Fix -Wformat problem.
Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.108
diff -u -r1.108 remote.c
--- remote.c 29 Jun 2003 21:17:22 -0000 1.108
+++ remote.c 30 Jun 2003 15:02:25 -0000
@@ -3287,7 +3287,8 @@
}
if (*p++ != ';')
- error ("Remote register badly formatted: %s\nhere:", buf, p);
+ error ("Remote register badly formatted: %s\nhere: %s",
+ buf, p);
}
}
/* fall through */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-30 15:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-30 13:15 Question about warning in gdb/remote.c Andreas Jaeger
2003-06-30 15:47 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox