diff options
author | Darren Tucker <dtucker@dtucker.net> | 2023-11-23 19:36:22 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2023-11-23 19:36:22 +1100 |
commit | a93284a780cd3972afe5f89086b75d564ba157f3 (patch) | |
tree | d3289b096e59a624c815edd61bdc5db41ba17149 | |
parent | 670f5a647e98b6fd95ad64f789f87ee3274b481b (diff) |
Add gcc-12 -Werror test on Ubuntu 22.04.
Explictly specify gcc-11 on Ubuntu 22.04 (it's the system compiler).
-rwxr-xr-x | .github/configs | 14 | ||||
-rw-r--r-- | .github/workflows/c-cpp.yml | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/.github/configs b/.github/configs index c7d6a55a..df82faf5 100755 --- a/.github/configs +++ b/.github/configs @@ -108,9 +108,19 @@ case "$config" in SKIP_LTESTS=sftp-chroot ;; gcc-11-Werror) - CC="gcc" + CC="gcc-11" + # -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled + # -Wunused-result ignores (void) so is not useful. See + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 + CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result" + CONFIGFLAGS="--with-pam --with-Werror" + ;; + gcc-12-Werror) + CC="gcc-12" # -Wnoformat-truncation in gcc 7.3.1 20180130 fails on fmt_scaled - CFLAGS="-Wall -Wextra -O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter" + # -Wunused-result ignores (void) so is not useful. See + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 + CFLAGS="-O2 -Wno-format-truncation -Wimplicit-fallthrough=4 -Wno-unused-parameter -Wno-unused-result" CONFIGFLAGS="--with-pam --with-Werror" ;; clang*|gcc*) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index caeca7d8..bb427552 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -47,7 +47,8 @@ jobs: - { target: ubuntu-20.04, config: gcc-7 } - { target: ubuntu-20.04, config: gcc-8 } - { target: ubuntu-20.04, config: gcc-10 } - - { target: ubuntu-20.04, config: gcc-11-Werror } + - { target: ubuntu-22.04, config: gcc-11-Werror } + - { target: ubuntu-22.04, config: gcc-12-Werror } - { target: ubuntu-20.04, config: pam } - { target: ubuntu-20.04, config: kitchensink } - { target: ubuntu-22.04, config: hardenedmalloc } |