[PATCH/RFA] Add -Wformat-zero-length for zero-length format warning
Jason R Thorpe
thorpej@wasabisystems.com
Sat May 18 10:14:00 GMT 2002
On Sat, May 18, 2002 at 12:11:13PM +0100, Joseph S. Myers wrote:
> I'm sure we don't want -Wformat=3 - -Wformat=2 should suffice for enabling
> "extra" checks.
Okay.
> There are lots of other checks for useless formats (e.g., for using
> useless combinations of flag characters where one gets ignored). One day
> extensible format checking might allow to you specify exactly what formats
> make sense for your format function. For now, if you really want to
> disable this particular check, add -Wno-format-zero-length by analogy with
> -Wno-format-extra-args.
Er, are you saying that the zero-length warning should still be anabled
for the base -Wformat, or only for -Wformat=2? I'm willing to change the
patch to do either (though I would prefer that -Wformat=2 enable the zero-
length check, because it means I don't have to add another compiler switch
to various Makefiles, which means I don't have to add another local change
to our current 2.95.3-based compiler :-)
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
More information about the Gcc-patches
mailing list