Ben Pfaff <b...@ovn.org> writes:

> I've noticed recently an annoying quantity of error messages like the
> following in builds in various places:
>
>     gcc: error: unrecognized command line option ‘-Wunknown-warning-option’
>
> This didn't really make sense because OVS checks whether the compiler
> supports warning options before it uses them.  Looking closer, the GCC
> manual has a note that explains the issue:
>
>      When an unrecognized warning option is requested (e.g.,
>     '-Wunknown-warning'), GCC emits a diagnostic stating that the
>     option is not recognized.  However, if the '-Wno-' form is used,
>     the behavior is slightly different: no diagnostic is produced for
>     '-Wno-unknown-warning' unless other diagnostics are being
>     produced.  This allows the use of new '-Wno-' options with old
>     compilers, but if something goes wrong, the compiler warns that
>     an unrecognized option is present.
>
> Thus, we can properly check only for the *positive* version of a warning
> option, so this commit makes the OVS tests do that.
>
> Fixes: a7021b08b0d5 ("configure: Disable -Wnull-pointer-arithmetic Clang 
> warning.")
> Signed-off-by: Ben Pfaff <b...@ovn.org>
> ---

I didn't get a chance to test this out, but the change looks sane.

Acked-by: Aaron Conole <acon...@redhat.com>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to