Report stated a -Wformat-nonliteral at line 612,
and a -Wformat-security at line 614
I was only seeing the latter, so I added the former to the
flags in sys/unix/hints/include/compiler.370. Some compiler
versions have that warning on by default internally and others
don't. If the format string isn't a string literal, there's no
inteference with printf argument checking because that only
operates on string literals.
}
#if defined(SIMPLE_MAIL) || defined(SERVER_ADMIN_MSG)
+
+DISABLE_WARNING_FORMAT_NONLITERAL
+
void
read_simplemail(char *mbox, boolean adminmsg)
{
pline(msgfrom, curline);
if (adminmsg)
- verbalize(msg);
+ verbalize("%s", msg);
else
pline("It reads: \"%s\".", msg);
if (!adminmsg)
pline("It appears to be all gibberish.");
}
+
+RESTORE_WARNING_FORMAT_NONLITERAL
+
#endif /* SIMPLE_MAIL */
void
CFLAGS+=-pedantic
CFLAGS+=-Wmissing-declarations
CFLAGS+=-Wunreachable-code
+CFLAGS+=-Wformat-nonliteral
#
# the following are not allowed in C++
CFLAGS+=-Wimplicit