From 834152a6e3f3e8459b53e49370bfdd82685a700d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Apr 2021 11:16:20 +0200 Subject: Disable bunch of bogus GCC warnings --- build/root.build | 2 ++ libbuild2/bin/utility.cxx | 3 --- tests/build/root.build | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/root.build b/build/root.build index aec5e89..e30b489 100644 --- a/build/root.build +++ b/build/root.build @@ -21,6 +21,8 @@ if ($cxx.target.system == 'win32-msvc') if ($cxx.class == 'msvc') cxx.coptions += /wd4251 /wd4275 /wd4800 /wd4819 +elif ($cxx.id == 'gcc') + cxx.coptions += -Wno-maybe-uninitialized -Wno-free-nonheap-object # libbutl cxx.poptions =+ "-I$out_root" "-I$src_root" diff --git a/libbuild2/bin/utility.cxx b/libbuild2/bin/utility.cxx index 11230cd..cb06287 100644 --- a/libbuild2/bin/utility.cxx +++ b/libbuild2/bin/utility.cxx @@ -14,9 +14,6 @@ namespace build2 lorder link_order (const scope& bs, otype ot) { - // Initialize to suppress 'may be used uninitialized' warning produced - // by MinGW GCC 5.4.0. - // const char* var (nullptr); switch (ot) diff --git a/tests/build/root.build b/tests/build/root.build index 5bf6731..00fa374 100644 --- a/tests/build/root.build +++ b/tests/build/root.build @@ -13,6 +13,8 @@ if ($cxx.target.system == 'win32-msvc') if ($cxx.class == 'msvc') cxx.coptions += /wd4251 /wd4275 /wd4800 +elif ($cxx.id == 'gcc') + cxx.coptions += -Wno-maybe-uninitialized -Wno-free-nonheap-object # libbutl # Setup the build system driver that we are testing (which may not be the same # as our $build.path). We also need to disable importation using the built-in -- cgit v1.1