Michael Matz 2018-03-27 15:55:16 +00:00 committed by Git OBS Bridge
parent 45cbf065f2
commit 945af33f4d

@ -601,7 +601,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
for opt in -Wno-implicit-fallthrough -Wno-error=cast-function-type -Wno-error=stringop-truncation; do
if ! echo "int foo(void) { int a; return a;} " | \
$CC -x c -c - -o /dev/null -W ${opt} 2>&1 | \
grep Wno >/dev/null; then
egrep "Wno|no option" >/dev/null; then
CFLAGS="$CFLAGS ${opt}"
fi
done