This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/80895] format not a string literal and no format arguments; in GCC itself
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 May 2017 00:59:31 +0000
- Subject: [Bug other/80895] format not a string literal and no format arguments; in GCC itself
- Auto-submitted: auto-generated
- References: <bug-80895-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80895
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This patch is incorrect:
/* The gmsgid may be a format string with %< and %>. */
- warned = pedwarn (exploc, opt, gmsgid);
+ warned = pedwarn (exploc, opt, "%s", gmsgid);
See that comment of why.