GCC's "maybe uninitilized" warnings depend on optimizations for code flow analysis, and produce false positive errors with -Og. Default build gives us coverage with that, so let's just disable with -Og.
Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Message-ID: <f559b622eb2d1a384b4f30583a8af10531f4b032.1785144729.git....@redhat.com> --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index ec9b05414a..e2da31880b 100644 --- a/meson.build +++ b/meson.build @@ -746,6 +746,10 @@ warn_flags = [ '-Wno-typedef-redefinition', ] +if get_option('optimization') == 'g' + warn_flags += ['-Wno-error=maybe-uninitialized'] +endif + if host_os != 'darwin' tsa_has_cleanup = cc.compiles(''' struct __attribute__((capability("mutex"))) mutex {}; -- MST
