]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Add gcc-12 -Werror test on Ubuntu 22.04.
authorDarren Tucker <dtucker@dtucker.net>
Thu, 23 Nov 2023 08:36:22 +0000 (19:36 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 23 Nov 2023 08:36:22 +0000 (19:36 +1100)
Explictly specify gcc-11 on Ubuntu 22.04 (it's the system compiler).

.github/configs
.github/workflows/c-cpp.yml

index c7d6a55ab962f54b9e08c348b7e8a291590baa9e..df82faf5046bddc0953cf6c91347f689ff792c02 100755 (executable)
@@ -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*)
index caeca7d88300f496ff91fb310429ca229fe30aea..bb427552a8864e79e16af32d99029f264b273ce6 100644 (file)
@@ -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 }