From 78760c3538b41cbd7d576b860137c855f5355462 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 22 Jun 2023 17:36:25 +0200 Subject: [PATCH] Enable -Wextra for the CI builds Try detecting more warnings that can be useful when building the library. Don't use -Wextra with gcc 4.8 which generates several completely spurious warnings not generated by later compiler versions and which are not worth fixing/working around. --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 829a872dcd..3bc6c9421b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,7 @@ jobs: compiler: g++-4.8 container: ubuntu:18.04 configure_flags: --disable-shared + allow_extra_warnings: true use_xvfb: true - name: Ubuntu 18.04 wxGTK 3 compatible 3.0 runner: ubuntu-latest @@ -233,7 +234,10 @@ jobs: esac if [ -z ${{ matrix.allow_warnings }} ]; then - error_opts="-Werror $allow_warn_opt" + if [ -z ${{ matrix.allow_extra_warnings }} ]; then + error_opts="-Wextra" + fi + error_opts="$error_opts -Werror $allow_warn_opt" echo "wxMAKEFILE_ERROR_CXXFLAGS=$error_opts" >> $GITHUB_ENV echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV fi