On 13/03/2019 12:00, Daniel P. Berrangé wrote:
On Mon, Mar 11, 2019 at 01:56:14PM -0400, Ben Cotton wrote:
> | 1 || -Wformat || Check calls to "printf" and "scanf", etc., to
make
> sure that the arguments supplied have types appropriate to the format
> string specified, and that the conversions specified in the format
> string make sense. || -Wno-format
> |-
> | 2 || -Wformat-security || If -Wformat is specified, also warn about
> uses of format functions that represent possible security problems.
> || -Wno-format should disable this as well
These two are very valuable warnings. If a C application's existing
build process has not already enabled them by default, I would expect
they'll trigger a great number of warnings.
We're not using -Werror in Fedora though, so these will not cause a
build failure.
Actually the default optflags already has -Wall (which includes
-Wformat) and -Werror=format-security which enables that warning
and turns on -Werror for it.
So format-security does actually cause build failures already.
Tom
--
Tom Hughes (tom(a)compton.nu)
http://compton.nu/