diff options
Diffstat (limited to 'BUILD')
-rwxr-xr-x | BUILD/SETUP.sh | 10 | ||||
-rwxr-xr-x | BUILD/build_mccge.sh | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 614312b4236..0f97f265a52 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -98,7 +98,7 @@ SSL_LIBRARY=--with-ssl if [ "x$warning_mode" != "xpedantic" ]; then # Both C and C++ warnings - warnings="-Wall -Wextra -Wunused -Wwrite-strings" + warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized" # For more warnings, uncomment the following line # warnings="$warnings -Wshadow" @@ -112,7 +112,7 @@ if [ "x$warning_mode" != "xpedantic" ]; then # Added unless --with-debug=full debug_extra_cflags="-O0 -g3 -gdwarf-2" else - warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE" + warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -Wno-uninitialized -D_POSIX_SOURCE" c_warnings="$warnings" cxx_warnings="$warnings -std=c++98" # NOTE: warning mode should not influence optimize/debug mode. @@ -127,12 +127,14 @@ fi # Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro # LINT_INIT(), which is only useful for silencing spurious warnings # of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind. -valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_valgrind " +valgrind_flags="-DHAVE_valgrind -USAFEMALLOC" +valgrind_flags="$valgrind_flags -UFORCE_INIT_OF_VARS -Wno-uninitialized" valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max" valgrind_configs="--with-valgrind" # # Used in -debug builds -debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS " +debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG" +debug_cflags="$debug_cflags -DFORCE_INIT_OF_VARS -Wuninitialized" debug_cflags="$debug_cflags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC" error_inject="--with-error-inject " # diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh index 81dbebff32d..72546874b0f 100755 --- a/BUILD/build_mccge.sh +++ b/BUILD/build_mccge.sh @@ -1063,7 +1063,7 @@ set_warning_flags() warnings="$warnings -Wcomment -W" warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare" warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label" - warnings="$warnings -Wunused-value -Wunused-variable" + warnings="$warnings -Wunused-value -Wunused-variable -Wno-uninitialized" if test "x$warning_mode" = "extra" ; then warnings="$warnings -Wshadow" @@ -1094,7 +1094,8 @@ set_with_debug_flags() { if test "x$with_debug_flag" = "xyes" ; then if test "x$developer_flag" = "xyes" ; then - loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS " + loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG" + loc_debug_flags="$loc_debug_flags -Wuninitialized -DFORCE_INIT_OF_VARS" loc_debug_flags="$loc_debug_flags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC" compiler_flags="$compiler_flags $loc_debug_flags" fi |