As promised, here are the easy -Wformat-nonliteral changes. Most of
them consist of replacing calls like fprintf(stream, foo) with
fputs(foo, stream). A few of them consist of replacing error(msg)
with error("%s",msg). And one of them is an actual bug fix - there's
a call to internal_error that left out __FILE__ and __LINE__.
- internal_error ("Error converting character `%d' from `%s' to `%s' "
+ internal_error (__FILE__, __LINE__,
+ "Error converting character `%d' from `%s' to `%s' "
"character set: %s",
from_char, ci->from->name, ci->to->name,
safe_strerror (errno));
Having said that, there's still a lot of warnings triggered by
-Wformat-nonliteral; some of them are in situations with a fairly easy
workaround, but some of them are a little more delicate. I would
definitely recommend that the -Wformat-nonliteral patch be reverted
for the time being, because it's breaking compiles for some of us.
I've tested this with GCC 3.2, i686-pc-linux-gnu, DWARF-2; no new
regressions. It also doesn't turn up any regressions on GDB 6.0; I'd
lean towards applying the internal_error bug fix part of it to the
branch, but I don't have much of an opinion one way or another about
applying the entire patch.
OK to apply? It should all be obvious, but I might as well have
another set of eyes proofreading it.