From: Tom Tromey <tromey@redhat.com>
To: Doug Evans <dje@google.com>
Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: FYI: fix PR 11345
Date: Thu, 04 Mar 2010 18:21:00 -0000 [thread overview]
Message-ID: <m3mxyo0wyk.fsf@fleche.redhat.com> (raw)
In-Reply-To: <e394668d1003040928ke49c7f2hc70e915ce82f2d42@mail.gmail.com> (Doug Evans's message of "Thu, 4 Mar 2010 09:28:39 -0800")
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> I was explicitly turning on the warning.
On irc, Doug clarified that this was -Wformat=2.
Doug> If we adopt the rule that this file can't be compiled with that
Doug> warning, that's different.
Yeah, this file can't be compiled with -Wformat-nonliteral or anything
that implies it, like -Wformat=2.
I am checking in the appended to the trunk and the 7.1 branch.
Pedro verified that it works for him, and I also verified it locally
by passing -Wformat-security explicitly.
Tom
2010-03-04 Tom Tromey <tromey@redhat.com>
* printcmd.c (printf_command): Pass dummy argument to
printf_filtered.
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.171
diff -u -r1.171 printcmd.c
--- printcmd.c 3 Mar 2010 18:05:04 -0000 1.171
+++ printcmd.c 4 Mar 2010 18:16:15 -0000
@@ -2645,8 +2645,10 @@
/* Print the portion of the format string after the last argument.
Note that this will not include any ordinary %-specs, but it
might include "%%". That is why we use printf_filtered and not
- puts_filtered here. */
- printf_filtered (last_arg);
+ puts_filtered here. Also, we pass a dummy argument because
+ some platforms have modified GCC to include -Wformat-security
+ by default, which will warn here if there is no argument. */
+ printf_filtered (last_arg, 0);
}
do_cleanups (old_cleanups);
}
prev parent reply other threads:[~2010-03-04 18:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 18:04 Tom Tromey
2010-03-03 18:22 ` Tom Tromey
2010-03-04 0:47 ` Pedro Alves
2010-03-04 2:35 ` Doug Evans
2010-03-04 2:43 ` Pedro Alves
2010-03-04 2:56 ` Doug Evans
2010-03-04 3:01 ` Pedro Alves
2010-03-04 2:36 ` Tom Tromey
2010-03-04 17:01 ` Tom Tromey
2010-03-04 17:20 ` Pedro Alves
2010-03-04 17:28 ` Doug Evans
2010-03-04 18:21 ` Tom Tromey [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=m3mxyo0wyk.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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