From 1d2a50ecaaef9442f76245ab7ef64020a36d4a2e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 26 Aug 2019 00:24:45 +0000 Subject: [PATCH] scripts/run-regression-tests: Suppress several gcc 9 compiler warnings Suppress several gcc 9 compiler warnings for kernel versions before v5.1. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8570 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/run-regression-tests | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index 0ba6ce7e2..4cb024949 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -675,8 +675,16 @@ do 2.*|3.*) # Tell the kernel that we are using gcc 4.6. KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6" - export KCFLAGS;; esac + # See also commit bd664f6b3e37 ("disable new gcc-7.1.1 warnings for now"; + # v4.13) and commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member' + # warning"; v5.1). + for w in -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -Wno-address-of-packed-member; do + if gcc -c -xc - "$w" &/dev/null; then + KCFLAGS+=" $w" + fi + done + export KCFLAGS subdirs=(drivers/scst) if [ "${run_sparse}" = "true" ]; then run_sparse "$k" "${subdirs[@]}"