Skip to content

Commit 079eed9

Browse files
committed
silence compiler warnings
Signed-off-by: Steffen Jaeckel <[email protected]>
1 parent db836ba commit 079eed9

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

testme.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,19 @@ do
401401
continue
402402
fi
403403
compiler_version=$(echo "$i="$($i -dumpversion))
404-
if [ "$compiler_version" == "clang=4.2.1" ]
405-
then
406-
# one of my versions of clang complains about some stuff in stdio.h and stdarg.h ...
407-
TEST_CFLAGS="-Wno-typedef-redefinition"
408-
else
409-
TEST_CFLAGS=""
410-
fi
404+
case "$compiler_version" in
405+
clang*=4.2.1)
406+
# one of my versions of clang complains about some stuff in stdio.h and stdarg.h ...
407+
TEST_CFLAGS="-Wno-typedef-redefinition"
408+
;;
409+
gcc*=9.*)
410+
# gcc 9 seems to sometimes think that variables are uninitialized, but they are.
411+
TEST_CFLAGS="-Wno-maybe-uninitialized"
412+
;;
413+
*)
414+
TEST_CFLAGS=""
415+
;;
416+
esac
411417
echo $compiler_version
412418

413419
for a in "${archflags[@]}"

0 commit comments

Comments
 (0)