New option -Wno-format-extra-args : suppress warning for:
printf("foo", bar);
since that isn't interesting from the POV of this audit, and it's more
common than most in some code.
also, do format args checking for
printf(Aflag ? "format 1: %s" : "format 2: %s", bar);
albeit in a half-hearted way for now (just check the "then" case)
If -Wformat is enabled, try harder to chase down compile-time constant
format strings.. capable of catching things like:
const char foo[]="%s %d";
printf(foo, 1, "2");
If the new option -Wnetbsd-format-audit (no, I don't like the name,
either) is enabled, complain about non-constant format strings we
can't verify. In particular, for *v*printf-like functions (i.e.,
non-variadic functions which are passed a va_list), insist that the
format string come from a parameter declared as a format string
argument, so that functions which should be declared as printflike are
caught at compile time.