mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
configure: suppress "maybe uninitialized" warnings altogether unless -O3.
We were just telling GCC not to treat them as errors: this suppresses them entirely unless at -O3. People keep trying to "fix" them, when in fact they're false positives, as revealed with "./configure COPTFLAGS=-O3". Fixes: #2856 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
5a3ba1ce99
commit
df298ba7e3
4
configure
vendored
4
configure
vendored
@@ -34,12 +34,12 @@ default_coptflags()
|
|||||||
default_cwarnflags()
|
default_cwarnflags()
|
||||||
{
|
{
|
||||||
F=$BASE_WARNFLAGS
|
F=$BASE_WARNFLAGS
|
||||||
# Clang doesn't like -Wno-error=maybe-uninitialized, but doesn't seem
|
# Clang doesn't like -Wno-maybe-uninitialized, but doesn't seem
|
||||||
# to give spurious warnings, either.
|
# to give spurious warnings, either.
|
||||||
if [ "$2" = 1 ]; then
|
if [ "$2" = 1 ]; then
|
||||||
# With old gccs, or optimization != -O3, we need to suppress some warnings.
|
# With old gccs, or optimization != -O3, we need to suppress some warnings.
|
||||||
if [ -n "${1##*-O3*}" ] || [ "$3" != "1" ]; then
|
if [ -n "${1##*-O3*}" ] || [ "$3" != "1" ]; then
|
||||||
F="$F -Wno-error=maybe-uninitialized"
|
F="$F -Wno-maybe-uninitialized"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "$F"
|
echo "$F"
|
||||||
|
|||||||
Reference in New Issue
Block a user