Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Andreas Jaeger <aj@suse.de>
Cc: gdb@sources.redhat.com
Subject: Re: Question about warning in gdb/remote.c
Date: Mon, 30 Jun 2003 15:47:00 -0000	[thread overview]
Message-ID: <3F005208.9080704@redhat.com> (raw)
In-Reply-To: <hon0g02eg5.fsf@byrd.suse.de>

[-- 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 */

      reply	other threads:[~2003-06-30 15:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30 13:15 Andreas Jaeger
2003-06-30 15:47 ` Andrew Cagney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F005208.9080704@redhat.com \
    --to=ac131313@redhat.com \
    --cc=aj@suse.de \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox