GitHub: Use -Wnonnull for GCC build
authorNicolas Williams <nico@twosigma.com>
Wed, 19 Jan 2022 23:00:11 +0000 (17:00 -0600)
committerNicolas Williams <nico@twosigma.com>
Wed, 19 Jan 2022 23:00:11 +0000 (17:00 -0600)
.github/workflows/linux.yml

index 89cdf2bed2a096be3d111dafb80ca7c6dd9b4436..48e4c80dc3c25c54ae1b9b50f50112f797e1fe46 100644 (file)
@@ -59,9 +59,11 @@ jobs:
                     - name: linux-clang
                       os: ubuntu-18.04
                       compiler: clang
+                      cflags: ''
                     - name: linux-gcc
                       os: ubuntu-18.04
                       compiler: gcc
+                      cflags: '-Wnonnull'
         steps:
             - name: Clone repository
               uses: actions/checkout@v1
@@ -86,7 +88,7 @@ jobs:
                 /bin/sh ./autogen.sh
                 mkdir build
                 cd build
-                ../configure --srcdir=`dirname "$PWD"` --enable-maintainer-mode --enable-developer --with-ldap $CONFIGURE_OPTS --prefix=$HOME/inst CFLAGS="-Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations"
+                ../configure --srcdir=`dirname "$PWD"` --enable-maintainer-mode --enable-developer --with-ldap $CONFIGURE_OPTS --prefix=$HOME/inst CFLAGS="${{ matrix.cflags }} -Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations"
                 make -j4
             - name: Test
               env: