On Wed, Mar 13, 2019 at 12:21:29PM +0000, Tom Hughes wrote:
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.
I wonder why this change is suggesting to add the flags if they
are already present in our current optflags ?
So format-security does actually cause build failures already.
That's good !
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|