From 9fdf2edb2ff3a39fd82aca68a00ed80d0f05fbb3 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 3 Nov 2020 01:17:14 +0100 Subject: [PATCH 01/25] Issue #823 follow-up: support branches named like "fightwarn" to build more test cases in Travis CI --- .travis.yml | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8b9e7c184..a08d25a2e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -228,7 +228,12 @@ _matrix_required_linux_pass3_large: # Ordered by variants expected to succeed to run first, # although with current Travis CI implementation, the env # blocks listed in allowed_failures only run after all -# those not listed: +# those not listed. Jobs which currently fail until code +# gets fixed are conditional with "if: branch =~ fightwarn" +# so users (and NUT upstream) can define a branch with a +# name containing this keyword to work on bug fixes, but by +# default the main development would not bother Travis CI +# to waste resources in vain. # _matrix_linux_gnustd_nowarn: @@ -344,6 +349,7 @@ _matrix_linux_cstd_nowarn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -360,6 +366,7 @@ _matrix_linux_cstd_nowarn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -376,6 +383,7 @@ _matrix_linux_cstd_nowarn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -392,6 +400,7 @@ _matrix_linux_cstd_nowarn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -410,6 +419,7 @@ _matrix_linux_gnustd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -421,6 +431,7 @@ _matrix_linux_gnustd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -432,6 +443,7 @@ _matrix_linux_gnustd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -443,6 +455,7 @@ _matrix_linux_gnustd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: sources: @@ -458,6 +471,7 @@ _matrix_linux_gnustd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: sources: @@ -474,6 +488,7 @@ _matrix_linux_gnustd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -488,6 +503,7 @@ _matrix_linux_cstd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -500,6 +516,7 @@ _matrix_linux_cstd_warn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -516,6 +533,7 @@ _matrix_linux_cstd_warn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -532,6 +550,7 @@ _matrix_linux_cstd_warn: services: - docker compiler: clang + if: branch =~ fightwarn addons: apt: sources: @@ -547,6 +566,7 @@ _matrix_linux_cstd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -558,6 +578,7 @@ _matrix_linux_cstd_warn: services: - docker compiler: gcc + if: branch =~ fightwarn addons: apt: packages: @@ -600,6 +621,7 @@ _matrix_osx_gnustd_warn: os: osx osx_image: xcode10.2 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -609,6 +631,7 @@ _matrix_osx_gnustd_warn: os: osx osx_image: xcode10.2 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -620,6 +643,7 @@ _matrix_osx_cstd_nowarn: os: osx osx_image: xcode10.2 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -629,6 +653,7 @@ _matrix_osx_cstd_nowarn: os: osx osx_image: xcode10.2 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -640,6 +665,7 @@ _matrix_osx_cstd_warn: os: osx osx_image: xcode10.2 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -649,6 +675,7 @@ _matrix_osx_cstd_warn: os: osx osx_image: xcode10.2 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -658,6 +685,7 @@ _matrix_osx_cstd_warn: os: osx osx_image: xcode7.3 compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/Library/Caches/Homebrew @@ -674,6 +702,7 @@ _matrix_windows_gnustd_nowarn: - env: NUT_MATRIX_TAG="gnu99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ os: windows compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/AppData/Local/Temp/chocolatey @@ -685,6 +714,7 @@ _matrix_windows_cstd_nowarn: - env: NUT_MATRIX_TAG="c99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ os: windows compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/AppData/Local/Temp/chocolatey @@ -696,6 +726,7 @@ _matrix_windows_cstd_warn: - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ os: windows compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/AppData/Local/Temp/chocolatey @@ -707,6 +738,7 @@ _matrix_windows_cstd_warn: - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Werror -pedantic -std=c20" CXXFLAGS="-Wall -Werror -std=c++20" CC=clang CXX=clang++ os: windows compiler: clang + if: branch =~ fightwarn cache: directories: - $HOME/AppData/Local/Temp/chocolatey @@ -803,7 +835,8 @@ _matrix_all: _matrix_master: include: &_matrix_master - *_matrix_required -### Enable for branch builds that intend to fix the issues which preclude +### Enabled for branches with names containing "fightwarn" to perform +### builds that intend to actively fix the issues which preclude the ### following items from becoming green: # - *_matrix_allowfail_linux # - *_matrix_allowfail_osx From b0ced1f124a6d95bb41d10398ec849419ea68b81 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 3 Nov 2020 01:17:40 +0100 Subject: [PATCH 02/25] Issue #823 follow-up: support branches named like "fightwarn" to build more test cases in Travis CI (actually enable those build matrices) --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a08d25a2e9..b1a2d5ee86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -838,9 +838,9 @@ _matrix_master: ### Enabled for branches with names containing "fightwarn" to perform ### builds that intend to actively fix the issues which preclude the ### following items from becoming green: -# - *_matrix_allowfail_linux -# - *_matrix_allowfail_osx -# - *_matrix_windows + - *_matrix_allowfail_linux + - *_matrix_allowfail_osx + - *_matrix_windows _matrix_fixbugs: include: &_matrix_fixbugs From 98d8fe0cc58766ec5172db7c97ac6c7228de3544 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 3 Nov 2020 01:18:05 +0100 Subject: [PATCH 03/25] .travis.yml : separate the "_matrix_gnustd_nowarn" --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b1a2d5ee86..866f9d46e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -808,8 +808,11 @@ _matrix_cstd_nowarn: - *_matrix_linux_cstd_nowarn - *_matrix_osx_cstd_nowarn - *_matrix_windows_cstd_nowarn -### - *_matrix_osx_gnustd_nowarn -### - *_matrix_linux_gnustd_nowarn + +_matrix_gnustd_nowarn: + include: &_matrix_gnustd_nowarn + - *_matrix_osx_gnustd_nowarn + - *_matrix_linux_gnustd_nowarn _matrix_warn: include: &_matrix_warn From 07cf281b1c5975e8620fe6721b8bf00077878250 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 3 Nov 2020 01:18:18 +0100 Subject: [PATCH 04/25] .travis.yml : rephrase some comments --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 866f9d46e8..cbb3fbc4d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -857,10 +857,11 @@ _matrix_fixbugs: # # DO NOT COMMIT TO MASTER BRANCH TEST-MATRICES THAT ARE NOT _matrix-master! # -# These days, "jobs" and "matrix" are same thing... at least, ours is an explicit list. +# These days, "jobs" and "matrix" (Travis keywords) are same thing... at least, +# ours is an explicit list. # By "fast_finish" we allow to assign a verdict based on completion of required # test cases. The "allow_failures" will proceed to run for our information -# but not block nor delay PR considerations etc. +# but should not block nor delay PR considerations etc. jobs: fast_finish: true include: From c0ec69ea323385ef55a0276327a490a52bebcc7b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 3 Nov 2020 10:45:17 +0100 Subject: [PATCH 05/25] ci_build.sh : if configure script fails, dump its log before exiting --- ci_build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci_build.sh b/ci_build.sh index 1f0de7d4f5..6ea85d3b13 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -262,7 +262,8 @@ default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck| echo "=== CONFIGURING NUT: ./configure ${CONFIG_OPTS[*]}" echo "=== CC='$CC' CXX='$CXX' CPP='$CPP'" - $CI_TIME ./configure "${CONFIG_OPTS[@]}" + $CI_TIME ./configure "${CONFIG_OPTS[@]}" \ + || { RES=$?; echo "=========== DUMPING config.log :"; cat config.log || true ; echo "=========== END OF config.log"; exit $RES; } case "$BUILD_TYPE" in "default-tgt:"*) # Hook for matrix of custom distchecks primarily From d1dccecb65cdf8fab7fc14477b23ccdc2cefa9d3 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 15:12:24 +0100 Subject: [PATCH 06/25] ci_build.sh: if configure failed, sleep a bit before dumping config.log --- ci_build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci_build.sh b/ci_build.sh index 6ea85d3b13..96813f1d86 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -263,7 +263,14 @@ default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck| echo "=== CONFIGURING NUT: ./configure ${CONFIG_OPTS[*]}" echo "=== CC='$CC' CXX='$CXX' CPP='$CPP'" $CI_TIME ./configure "${CONFIG_OPTS[@]}" \ - || { RES=$?; echo "=========== DUMPING config.log :"; cat config.log || true ; echo "=========== END OF config.log"; exit $RES; } + || { RES=$? + echo "FAILED ($RES) to configure nut, will dump config.log in a second to help troubleshoot CI" >&2 + echo " (or press Ctrl+C to abort now if running interactively)" >&2 + sleep 1 + echo "=========== DUMPING config.log :"; cat config.log || true ; echo "=========== END OF config.log" + echo "FATAL: FAILED ($RES) to ./configure ${CONFIG_OPTS[*]}" >&2 + exit $RES + } case "$BUILD_TYPE" in "default-tgt:"*) # Hook for matrix of custom distchecks primarily From 4b75c10c5314637ffc905f59b7f434c18cdc6392 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 16:20:29 +0100 Subject: [PATCH 07/25] ci_build.sh: do not hide autogen.sh stderr --- ci_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_build.sh b/ci_build.sh index 96813f1d86..e77ccae56a 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -253,7 +253,7 @@ default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck| if [ "$TRAVIS_OS_NAME" = "windows" ] ; then $CI_TIME ./autogen.sh || true else - $CI_TIME ./autogen.sh 2>/dev/null + $CI_TIME ./autogen.sh ### 2>/dev/null fi if [ "$NO_PKG_CONFIG" == "true" ] && [ "$TRAVIS_OS_NAME" = "linux" ] ; then echo "NO_PKG_CONFIG==true : BUTCHER pkg-config for this test case" >&2 From e8eb5814a42ecf315b4100c0ff77717aa1d889e6 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 11:54:24 +0100 Subject: [PATCH 08/25] configure.ac : work around libtool weakness seen by pedantic compilers --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 9cae02bd57..0faffba512 100644 --- a/configure.ac +++ b/configure.ac @@ -996,7 +996,21 @@ dnl ---------------------------------------------------------------------- dnl checks related to --with-dev dnl We only init libtool there to allow AC_DISABLE_STATIC +if ( test "${GCC}" = "yes" || test "${CLANG}" = "yes" ) +then + dnl # Avoid new compilers' warnings/errors about libtool distro flaws in this test like: + dnl # error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic] + dnl # {"nm_test_func", (void *) &nm_test_func}, + dnl # or ones about LTO as in https://www.mail-archive.com/libtool@gnu.org/msg14037.html + dnl # leading to undefined "global_symbol_pipe" in generated libtool script + CFLAGS_SAVED_NOPEDANTIC="$CFLAGS" + CFLAGS="$CFLAGS -Wno-pedantic -ffat-lto-objects -Wno-error" +fi AC_PROG_LIBTOOL +if ( test "${GCC}" = "yes" || test "${CLANG}" = "yes" ) +then + CFLAGS="$CFLAGS_SAVED_NOPEDANTIC" +fi dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_dev}" != "no"; then From 3f08e5c46f5ccde98bbd416f6c72b4f51e4604f7 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 12:12:34 +0100 Subject: [PATCH 09/25] configure.ac : work around libtool weakness seen by pedantic compilers (did not test for "${CLANG}" so drop it for now) --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0faffba512..e05f71ce98 100644 --- a/configure.ac +++ b/configure.ac @@ -996,7 +996,7 @@ dnl ---------------------------------------------------------------------- dnl checks related to --with-dev dnl We only init libtool there to allow AC_DISABLE_STATIC -if ( test "${GCC}" = "yes" || test "${CLANG}" = "yes" ) +if ( test "${GCC}" = "yes" ) then dnl # Avoid new compilers' warnings/errors about libtool distro flaws in this test like: dnl # error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic] @@ -1007,7 +1007,7 @@ then CFLAGS="$CFLAGS -Wno-pedantic -ffat-lto-objects -Wno-error" fi AC_PROG_LIBTOOL -if ( test "${GCC}" = "yes" || test "${CLANG}" = "yes" ) +if ( test "${GCC}" = "yes" ) then CFLAGS="$CFLAGS_SAVED_NOPEDANTIC" fi From cdd9c4f44fd8942af8b72027d5caf22753481cdb Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 18:38:50 +0100 Subject: [PATCH 10/25] configure.ac: revise the fix for AC_PROG_LIBTOOL to only revert settings already passed to the compiler (that older releases may not understand if we just force them) --- configure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e05f71ce98..a716653b10 100644 --- a/configure.ac +++ b/configure.ac @@ -1001,10 +1001,19 @@ then dnl # Avoid new compilers' warnings/errors about libtool distro flaws in this test like: dnl # error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic] dnl # {"nm_test_func", (void *) &nm_test_func}, - dnl # or ones about LTO as in https://www.mail-archive.com/libtool@gnu.org/msg14037.html - dnl # leading to undefined "global_symbol_pipe" in generated libtool script + dnl # or ones about LTO (-flto -fno-common) as discussed and suggested + dnl # in https://www.mail-archive.com/libtool@gnu.org/msg14037.html - + dnl # all leading to undefined "global_symbol_pipe" in the generated + dnl # libtool script, and resulting in errors like `... | | ...` below : + dnl # libtool: link: /usr/bin/nm -B .libs/upsclient.o \ + dnl # ../common/.libs/libcommonclient.a | | /usr/bin/sed 's/.* //' \ + dnl # | sort | uniq > .libs/libupsclient.exp + dnl # ../libtool: syntax error: `|' unexpected + CFLAGS_SAVED_NOPEDANTIC="$CFLAGS" - CFLAGS="$CFLAGS -Wno-pedantic -ffat-lto-objects -Wno-error" + AS_CASE(["${CFLAGS}"],[*"-pedantic"*],[CFLAGS="${CFLAGS} -Wno-pedantic"]) + AS_CASE(["${CFLAGS}"],[*"-Werror"*],[CFLAGS="${CFLAGS} -Wno-error"]) + AS_CASE(["${CFLAGS}"],[*"-flto"*],[CFLAGS="${CFLAGS} -ffat-lto-objects"]) fi AC_PROG_LIBTOOL if ( test "${GCC}" = "yes" ) From 1204cee1a7da7be8b2ba149dea939409471f822b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 19:17:28 +0100 Subject: [PATCH 11/25] .travis.yml : enable "-Wextra" for default gcc versions on Linux (follow-up to issue #823) --- .travis.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index cbb3fbc4d4..0bad818c16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -413,7 +413,7 @@ _matrix_linux_cstd_nowarn: # Stuff with warnings made fatal... well, is usually fatal so far: _matrix_linux_gnustd_warn: include: &_matrix_linux_gnustd_warn - - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic" CXXFLAGS="-Wall -Werror" + - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" os: linux sudo: false services: @@ -425,7 +425,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" + - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" os: linux sudo: false services: @@ -437,7 +437,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Werror -std=gnu++11" + - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" os: linux sudo: false services: @@ -482,7 +482,7 @@ _matrix_linux_gnustd_warn: - *deps_driverlibs # Note: Fixing these would make NUT viable again on platforms with only ANSI C! - - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Werror -std=gnu++89" + - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++89" os: linux sudo: false services: @@ -497,7 +497,7 @@ _matrix_linux_gnustd_warn: # The hardest of two worlds: both strict C standards on Linux and fatal warnings: _matrix_linux_cstd_warn: include: &_matrix_linux_cstd_warn - - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" + - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" os: linux sudo: false services: @@ -560,7 +560,7 @@ _matrix_linux_cstd_warn: - clang-format-8 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Werror -std=c++11" + - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" os: linux sudo: false services: @@ -572,7 +572,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Werror -std=c++89" + - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror -std=c++89" os: linux sudo: false services: @@ -882,17 +882,17 @@ jobs: - env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8 - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic" CXXFLAGS="-Wall -Werror" - - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" - - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" + - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" + - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" + - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Werror -std=c++11" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Werror -std=c++11" - - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Werror -std=gnu++11" + - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" + - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" #OK# - env: NUT_MATRIX_TAG="gnu89-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89" - - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Werror -std=c++89" - - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Werror -std=gnu++89" + - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror -std=c++89" + - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++89" ### macosx #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++ From f8dcf503d64bd0d9a57fecee066e2418982039d0 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 19:18:31 +0100 Subject: [PATCH 12/25] .travis.yml : enable "-Wextra" for newer gcc versions on Linux (follow-up to issue #823) --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0bad818c16..f534a1a55e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -449,7 +449,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 + - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 os: linux sudo: false services: @@ -465,7 +465,7 @@ _matrix_linux_gnustd_warn: - gcc-7 - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 + - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 os: linux sudo: false services: @@ -876,7 +876,7 @@ jobs: #OK# - env: NUT_MATRIX_TAG="gnu17-gcc-9-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9 #OK# - env: NUT_MATRIX_TAG="gnu99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 + - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 - env: NUT_MATRIX_TAG="c99-clang-3.5-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang-3.5 CXX=clang++-3.5 - env: NUT_MATRIX_TAG="c99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++ @@ -885,7 +885,7 @@ jobs: - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" - - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 + - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Werror -std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" From 12a70b60cf54ece9226041b6f052db71f640a3ef Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 19:22:14 +0100 Subject: [PATCH 13/25] .travis.yml : enable "-Wextra -Weverything" for clang (follow-up to issue #823) --- .travis.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index f534a1a55e..a9c24390dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -509,7 +509,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -526,7 +526,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Werror -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++11" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -543,7 +543,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang-8 CXX=clang++-8 os: linux dist: xenial sudo: false @@ -617,7 +617,7 @@ _matrix_osx_gnustd_nowarn: _matrix_osx_gnustd_warn: include: &_matrix_osx_gnustd_warn - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -627,7 +627,7 @@ _matrix_osx_gnustd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Werror -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -661,7 +661,7 @@ _matrix_osx_cstd_nowarn: _matrix_osx_cstd_warn: include: &_matrix_osx_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -671,7 +671,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -681,7 +681,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode7.3 compiler: clang @@ -723,7 +723,7 @@ _matrix_windows_cstd_nowarn: _matrix_windows_cstd_warn: include: &_matrix_windows_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -735,7 +735,7 @@ _matrix_windows_cstd_warn: # Incidentally, this is one platform we know to have clang-9, # the version which has (at least partial) C++20 support - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Werror -pedantic -std=c20" CXXFLAGS="-Wall -Werror -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++20" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -881,13 +881,13 @@ jobs: - env: NUT_MATRIX_TAG="c99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang-8 CXX=clang++-8 - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Werror -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" #OK# - env: NUT_MATRIX_TAG="gnu89-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89" @@ -897,18 +897,18 @@ jobs: #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode7.3-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Werror -std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Werror -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++17" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Werror -pedantic -std=c17" CXXFLAGS="-Wall -Werror -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ ### windows - env: NUT_MATRIX_TAG="gnu99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Werror -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Werror -pedantic -std=c20" CXXFLAGS="-Wall -Werror -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++20" CC=clang CXX=clang++ before_install: - |- From 2e89eb8974ecb03f4709e579f500578d382710fe Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 5 Nov 2020 09:12:54 +0100 Subject: [PATCH 14/25] .travis.yml: in clang test cases, do not insist that all macros are used, or we can not pass even autoconf --- .travis.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index a9c24390dc..bb65a7824e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -509,7 +509,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -526,7 +526,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -543,7 +543,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 os: linux dist: xenial sudo: false @@ -617,7 +617,7 @@ _matrix_osx_gnustd_nowarn: _matrix_osx_gnustd_warn: include: &_matrix_osx_gnustd_warn - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -627,7 +627,7 @@ _matrix_osx_gnustd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -661,7 +661,7 @@ _matrix_osx_cstd_nowarn: _matrix_osx_cstd_warn: include: &_matrix_osx_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -671,7 +671,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -681,7 +681,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode7.3 compiler: clang @@ -723,7 +723,7 @@ _matrix_windows_cstd_nowarn: _matrix_windows_cstd_warn: include: &_matrix_windows_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -735,7 +735,7 @@ _matrix_windows_cstd_warn: # Incidentally, this is one platform we know to have clang-9, # the version which has (at least partial) C++20 support - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -881,13 +881,13 @@ jobs: - env: NUT_MATRIX_TAG="c99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" #OK# - env: NUT_MATRIX_TAG="gnu89-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89" @@ -897,18 +897,18 @@ jobs: #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode7.3-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ ### windows - env: NUT_MATRIX_TAG="gnu99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ before_install: - |- From a80d1b28d1fb46cc73352ec5e0a5935cc9e83fa8 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 5 Nov 2020 09:17:24 +0100 Subject: [PATCH 15/25] .travis.yml: in NUT_MATRIX test cases, specify -Werror=implicit-fallthrough=3 to let special comments quiesce the warning where a FALLTHRU is intentional --- .travis.yml | 76 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb65a7824e..2a881af9a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -413,7 +413,7 @@ _matrix_linux_cstd_nowarn: # Stuff with warnings made fatal... well, is usually fatal so far: _matrix_linux_gnustd_warn: include: &_matrix_linux_gnustd_warn - - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" + - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror" os: linux sudo: false services: @@ -425,7 +425,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" + - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" os: linux sudo: false services: @@ -437,7 +437,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" + - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++11" os: linux sudo: false services: @@ -449,7 +449,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 + - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 os: linux sudo: false services: @@ -465,7 +465,7 @@ _matrix_linux_gnustd_warn: - gcc-7 - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 + - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 os: linux sudo: false services: @@ -482,7 +482,7 @@ _matrix_linux_gnustd_warn: - *deps_driverlibs # Note: Fixing these would make NUT viable again on platforms with only ANSI C! - - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++89" + - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++89" os: linux sudo: false services: @@ -497,7 +497,7 @@ _matrix_linux_gnustd_warn: # The hardest of two worlds: both strict C standards on Linux and fatal warnings: _matrix_linux_cstd_warn: include: &_matrix_linux_cstd_warn - - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" + - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++99" os: linux sudo: false services: @@ -509,7 +509,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -526,7 +526,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -543,7 +543,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 os: linux dist: xenial sudo: false @@ -560,7 +560,7 @@ _matrix_linux_cstd_warn: - clang-format-8 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" + - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++11" os: linux sudo: false services: @@ -572,7 +572,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror -std=c++89" + - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++89" os: linux sudo: false services: @@ -617,7 +617,7 @@ _matrix_osx_gnustd_nowarn: _matrix_osx_gnustd_warn: include: &_matrix_osx_gnustd_warn - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -627,7 +627,7 @@ _matrix_osx_gnustd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -661,7 +661,7 @@ _matrix_osx_cstd_nowarn: _matrix_osx_cstd_warn: include: &_matrix_osx_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -671,7 +671,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -681,7 +681,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode7.3 compiler: clang @@ -723,7 +723,7 @@ _matrix_windows_cstd_nowarn: _matrix_windows_cstd_warn: include: &_matrix_windows_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -735,7 +735,7 @@ _matrix_windows_cstd_warn: # Incidentally, this is one platform we know to have clang-9, # the version which has (at least partial) C++20 support - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -876,39 +876,39 @@ jobs: #OK# - env: NUT_MATRIX_TAG="gnu17-gcc-9-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9 #OK# - env: NUT_MATRIX_TAG="gnu99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 + - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 - env: NUT_MATRIX_TAG="c99-clang-3.5-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang-3.5 CXX=clang++-3.5 - env: NUT_MATRIX_TAG="c99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" - - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" - - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" - - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" - - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror" + - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" + - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++99" + - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++11" + - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++11" #OK# - env: NUT_MATRIX_TAG="gnu89-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89" - - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror -std=c++89" - - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++89" + - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++89" + - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++89" ### macosx #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode7.3-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ ### windows - env: NUT_MATRIX_TAG="gnu99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ before_install: - |- From 0446d94cb5f7d652641ce0d886ea1d34cfc375cd Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 4 Nov 2020 22:35:45 +0100 Subject: [PATCH 16/25] include/common.h: introduce NUT_UNUSED* macros to mark up codebase --- include/common.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/common.h b/include/common.h index 248dadd374..16b6d1127d 100644 --- a/include/common.h +++ b/include/common.h @@ -53,6 +53,33 @@ extern "C" { extern const char *UPS_VERSION; +/* A somewhat portable way to mark unused variables to avoid warnings + (wherever we implement an API or ifdef large parts of codebase) per + https://stackoverflow.com/a/12891181/4715872 + */ +/* Example: void foo(int NUT_UNUSED(bar)) { ... } */ +#ifdef __GNUC__ +# define NUT_UNUSED(x) NUT_UNUSED_ ## x __attribute__((__unused__)) +#else +# define NUT_UNUSED(x) NUT_UNUSED_ ## x +#endif + +/* Example: static void NUT_UNUSED_FUNCTION(foo)(int bar) { ... } */ +#ifdef __GNUC__ +# define NUT_UNUSED_FUNCTION(x) __attribute__((__unused__)) NUT_UNUSED_ ## x +#else +# define NUT_UNUSED_FUNCTION(x) NUT_UNUSED_ ## x +#endif + +/* Use in code to notify the developers and quiesce the compiler that + * (for this codepath) the argument or variable is unused intentionally. + * void f(int x) { + * NUT_UNUSED_VARIABLE(x); + * ... + * } + */ +#define NUT_UNUSED_VARIABLE(x) (void)(x) + /** @brief Default timeout (in seconds) for network operations, as used by `upsclient` and `nut-scanner`. */ #define DEFAULT_NETWORK_TIMEOUT 5 From adae13b40ada7a301c04189e9f1a6296c65e4923 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 03:04:07 +0100 Subject: [PATCH 17/25] docs/developers.txt: document a valid use-case of goto for clean switch-case fall-through --- docs/developers.txt | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/developers.txt b/docs/developers.txt index 63fb911b32..0100a155ef 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -313,11 +313,46 @@ or access something outside their scope will throw a warning or even fail to compile in some cases. This is what we want. +Switch case fall-through +~~~~~~~~~~~~~~~~~~~~~~~~ + +While C standards allow to write `switch` statements th "fall through" +from handling one case into another, modern compilers frown upon that +practice and spew warnings which complicate detecting real bugs in the +code (and also looking back at some of the cases written decades ago, +it is not trivial to state whether the fall-through was intentional or +really is a bug). + +Compilers which detect such problem usually offer ways to decorate the +code with comments or attributes to qiuesce it in cases where the jump +is intentional; also C++17 introduces special keywords for that in the +standard. NUT aiming to be portable and independent of compilers as +much as possible, prefers the arguably clearer and standards-based way +of using `goto` into the next intended operation, even though it is a +couple of lines away, e.g.: + + int uppercase = 0; + switch (charopt) { + case 'U': + uppercase = 1; + goto fallthrough_case_u_option; + case 'u': + fallthrough_case_u_option: + process_u_option(uppercase); + break; + } + +In trivial cases, like falling through to `default` which just returns, +it may be clearer and more maintainable (adding other option cases in +the future) to just `return same_result` in the code block that would +fall through otherwise and avoid `goto` statements altogether. + Spaghetti ~~~~~~~~~ -If you use a goto, expect us to drop it when our head stops spinning. -It gives us flashbacks to the very old code we wrote. +If you use a `goto` that jumps over long distances (see "Switch case +fall-through" section above), expect us to drop it when our head stops +spinning. It gives us flashbacks to the very old code we wrote. We've tried to clean up our act, and you should make the effort as well. From d63750f21b827770744781f74424e7dfa7398b60 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 03:32:28 +0100 Subject: [PATCH 18/25] ci_build.sh: refactor to have a configure_nut() routine --- ci_build.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/ci_build.sh b/ci_build.sh index e77ccae56a..fdd06f9028 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -24,6 +24,20 @@ case "$CI_TRACE" in set -x ;; esac +configure_nut() { + echo "=== CONFIGURING NUT: ./configure ${CONFIG_OPTS[*]}" + echo "=== CC='$CC' CXX='$CXX' CPP='$CPP'" + $CI_TIME ./configure "${CONFIG_OPTS[@]}" \ + || { RES=$? + echo "FAILED ($RES) to configure nut, will dump config.log in a second to help troubleshoot CI" >&2 + echo " (or press Ctrl+C to abort now if running interactively)" >&2 + sleep 1 + echo "=========== DUMPING config.log :"; cat config.log || true ; echo "=========== END OF config.log" + echo "FATAL: FAILED ($RES) to ./configure ${CONFIG_OPTS[*]}" >&2 + exit $RES + } +} + echo "Processing BUILD_TYPE='${BUILD_TYPE}' ..." case "$BUILD_TYPE" in default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck|default-nodoc|default-withdoc|"default-tgt:"*) @@ -260,17 +274,7 @@ default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck| sudo dpkg -r --force all pkg-config fi - echo "=== CONFIGURING NUT: ./configure ${CONFIG_OPTS[*]}" - echo "=== CC='$CC' CXX='$CXX' CPP='$CPP'" - $CI_TIME ./configure "${CONFIG_OPTS[@]}" \ - || { RES=$? - echo "FAILED ($RES) to configure nut, will dump config.log in a second to help troubleshoot CI" >&2 - echo " (or press Ctrl+C to abort now if running interactively)" >&2 - sleep 1 - echo "=========== DUMPING config.log :"; cat config.log || true ; echo "=========== END OF config.log" - echo "FATAL: FAILED ($RES) to ./configure ${CONFIG_OPTS[*]}" >&2 - exit $RES - } + configure_nut case "$BUILD_TYPE" in "default-tgt:"*) # Hook for matrix of custom distchecks primarily From 0409f51865b0dd82ff3373075a9c5298053e98aa Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 03:35:00 +0100 Subject: [PATCH 19/25] ci_build.sh: refactor to have a build_to_only_catch_errors() routine --- ci_build.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ci_build.sh b/ci_build.sh index fdd06f9028..b54a37648c 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -38,6 +38,14 @@ configure_nut() { } } +build_to_only_catch_errors() { + ( echo "`date`: Starting the parallel build attempt (quietly to build what we can)..."; \ + $CI_TIME make VERBOSE=0 -k -j8 all >/dev/null 2>&1 ; ) || \ + ( echo "`date`: Starting the sequential build attempt (to list remaining files with errors considered fatal for this build configuration)..."; \ + $CI_TIME make VERBOSE=1 all -k ) || return $? + return 0 +} + echo "Processing BUILD_TYPE='${BUILD_TYPE}' ..." case "$BUILD_TYPE" in default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck|default-nodoc|default-withdoc|"default-tgt:"*) @@ -317,10 +325,7 @@ default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck| exit $? ;; "default-all-errors") - ( echo "`date`: Starting the parallel build attempt (quietly to build what we can)..."; \ - $CI_TIME make VERBOSE=0 -k -j8 all >/dev/null 2>&1 ; ) || \ - ( echo "`date`: Starting the sequential build attempt (to list remaining files with errors considered fatal for this build configuration)..."; \ - $CI_TIME make VERBOSE=1 all -k ) + build_to_only_catch_errors exit $? ;; esac From 604b4662a2ccfb11cdd804115dd096d0c8c85d9c Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 03:38:09 +0100 Subject: [PATCH 20/25] ci_build.sh: refactor to track failing "default-all-errors" so we can extend it to "configure_nut()" and "build_to_only_catch_errors()" more variants --- ci_build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci_build.sh b/ci_build.sh index b54a37648c..181d071298 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -325,8 +325,9 @@ default|default-alldrv|default-all-errors|default-spellcheck|default-shellcheck| exit $? ;; "default-all-errors") - build_to_only_catch_errors - exit $? + RES=0 + build_to_only_catch_errors || RES=$? + exit $RES ;; esac From a9318dc5d3ae08bdd67ad92ca78ce209a3784b5b Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 05:58:55 +0100 Subject: [PATCH 21/25] Satisfy the spellchecker --- docs/developers.txt | 2 +- docs/nut.dict | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/developers.txt b/docs/developers.txt index 0100a155ef..0633fcb2fb 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -324,7 +324,7 @@ it is not trivial to state whether the fall-through was intentional or really is a bug). Compilers which detect such problem usually offer ways to decorate the -code with comments or attributes to qiuesce it in cases where the jump +code with comments or attributes to quiesce it in cases where the jump is intentional; also C++17 introduces special keywords for that in the standard. NUT aiming to be portable and independent of compilers as much as possible, prefers the arguably clearer and standards-based way diff --git a/docs/nut.dict b/docs/nut.dict index 5573685da3..507b53ac1a 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 2491 utf-8 +personal_ws-1.1 en 2492 utf-8 AAS ACFAIL ACFREQ @@ -1530,6 +1530,7 @@ extendedhistory extradata fabula facto +fallthrough fatalx faultsensitivity fc From f6edf331a2d7c7cf7e8fe13133290f4f04165871 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 07:39:14 +0100 Subject: [PATCH 22/25] Update developers.txt Avoid "quiesce" to satisfy the spellchecker --- docs/developers.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/developers.txt b/docs/developers.txt index 0633fcb2fb..86eaad449b 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -324,9 +324,9 @@ it is not trivial to state whether the fall-through was intentional or really is a bug). Compilers which detect such problem usually offer ways to decorate the -code with comments or attributes to quiesce it in cases where the jump -is intentional; also C++17 introduces special keywords for that in the -standard. NUT aiming to be portable and independent of compilers as +code with comments or attributes to keep it quiet it in cases where the +jump is intentional; also C++17 introduces special keywords for that in +the standard. NUT aiming to be portable and independent of compilers as much as possible, prefers the arguably clearer and standards-based way of using `goto` into the next intended operation, even though it is a couple of lines away, e.g.: From 01a64a224727181b897462c324af7f1567d48638 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 07:39:58 +0100 Subject: [PATCH 23/25] Update developers.txt Another spellcheck fix --- docs/developers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers.txt b/docs/developers.txt index 86eaad449b..6fa2eba6a0 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -316,7 +316,7 @@ fail to compile in some cases. This is what we want. Switch case fall-through ~~~~~~~~~~~~~~~~~~~~~~~~ -While C standards allow to write `switch` statements th "fall through" +While C standards allow to write `switch` statements to "fall through" from handling one case into another, modern compilers frown upon that practice and spew warnings which complicate detecting real bugs in the code (and also looking back at some of the cases written decades ago, From 5063084633d1ee0a52564885269fa016ed522b67 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 17:33:21 +0100 Subject: [PATCH 24/25] docs/developers.txt: avoid spellcheck warning --- docs/developers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers.txt b/docs/developers.txt index 6fa2eba6a0..16c009e3c3 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -332,7 +332,7 @@ of using `goto` into the next intended operation, even though it is a couple of lines away, e.g.: int uppercase = 0; - switch (charopt) { + switch (char_opt) { case 'U': uppercase = 1; goto fallthrough_case_u_option; From f44dc5943e098a0fffb64eae8f29ed38c0c81bf1 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Sun, 8 Nov 2020 17:47:57 +0100 Subject: [PATCH 25/25] .travis.yml: our code (and checks) should not rely on specific compiler features; implicit switch FALLTHRU was solved by explicit goto jumps --- .travis.yml | 76 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a881af9a1..bb65a7824e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -413,7 +413,7 @@ _matrix_linux_cstd_nowarn: # Stuff with warnings made fatal... well, is usually fatal so far: _matrix_linux_gnustd_warn: include: &_matrix_linux_gnustd_warn - - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror" + - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" os: linux sudo: false services: @@ -425,7 +425,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" + - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" os: linux sudo: false services: @@ -437,7 +437,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++11" + - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" os: linux sudo: false services: @@ -449,7 +449,7 @@ _matrix_linux_gnustd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 + - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 os: linux sudo: false services: @@ -465,7 +465,7 @@ _matrix_linux_gnustd_warn: - gcc-7 - *deps_driverlibs - - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 + - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 os: linux sudo: false services: @@ -482,7 +482,7 @@ _matrix_linux_gnustd_warn: - *deps_driverlibs # Note: Fixing these would make NUT viable again on platforms with only ANSI C! - - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++89" + - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++89" os: linux sudo: false services: @@ -497,7 +497,7 @@ _matrix_linux_gnustd_warn: # The hardest of two worlds: both strict C standards on Linux and fatal warnings: _matrix_linux_cstd_warn: include: &_matrix_linux_cstd_warn - - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++99" + - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" os: linux sudo: false services: @@ -509,7 +509,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -526,7 +526,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ os: linux dist: xenial sudo: false @@ -543,7 +543,7 @@ _matrix_linux_cstd_warn: - clang-format-5.0 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 os: linux dist: xenial sudo: false @@ -560,7 +560,7 @@ _matrix_linux_cstd_warn: - clang-format-8 - *deps_driverlibs - - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++11" + - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" os: linux sudo: false services: @@ -572,7 +572,7 @@ _matrix_linux_cstd_warn: packages: - *deps_driverlibs - - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++89" + - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror -std=c++89" os: linux sudo: false services: @@ -617,7 +617,7 @@ _matrix_osx_gnustd_nowarn: _matrix_osx_gnustd_warn: include: &_matrix_osx_gnustd_warn - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -627,7 +627,7 @@ _matrix_osx_gnustd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -661,7 +661,7 @@ _matrix_osx_cstd_nowarn: _matrix_osx_cstd_warn: include: &_matrix_osx_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -671,7 +671,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode10.2 compiler: clang @@ -681,7 +681,7 @@ _matrix_osx_cstd_warn: - $HOME/Library/Caches/Homebrew - $HOME/.ccache - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ os: osx osx_image: xcode7.3 compiler: clang @@ -723,7 +723,7 @@ _matrix_windows_cstd_nowarn: _matrix_windows_cstd_warn: include: &_matrix_windows_cstd_warn - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -735,7 +735,7 @@ _matrix_windows_cstd_warn: # Incidentally, this is one platform we know to have clang-9, # the version which has (at least partial) C++20 support - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ os: windows compiler: clang if: branch =~ fightwarn @@ -876,39 +876,39 @@ jobs: #OK# - env: NUT_MATRIX_TAG="gnu17-gcc-9-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=gcc-9 CXX=g++-9 #OK# - env: NUT_MATRIX_TAG="gnu99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 + - env: NUT_MATRIX_TAG="gnu17-gcc-9-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" CC=gcc-9 CXX=g++-9 - env: NUT_MATRIX_TAG="c99-clang-3.5-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang-3.5 CXX=clang++-3.5 - env: NUT_MATRIX_TAG="c99-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c11-clang-5.0-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c11" CXXFLAGS="-std=c++11" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-8-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 - - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror" - - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" - - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++99" - - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 - - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++11" - - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++11" + - env: NUT_MATRIX_TAG="c17-clang-8-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang-8 CXX=clang++-8 + - env: NUT_MATRIX_TAG="cDefault-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic" CXXFLAGS="-Wall -Wextra -Werror" + - env: NUT_MATRIX_TAG="gnu99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" + - env: NUT_MATRIX_TAG="c99-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -std=c++99" + - env: NUT_MATRIX_TAG="gnu99-gcc-7-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++99" CC=gcc-7 CXX=g++-7 + - env: NUT_MATRIX_TAG="c99-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-clang-5.0-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++11" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c11" CXXFLAGS="-Wall -Wextra -Werror -std=c++11" + - env: NUT_MATRIX_TAG="gnu11-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu11" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++11" #OK# - env: NUT_MATRIX_TAG="gnu89-gcc-default-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu89" CXXFLAGS="-std=gnu++89" - - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=c++89" - - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -std=gnu++89" + - env: NUT_MATRIX_TAG="c89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=c89" CXXFLAGS="-Wall -Wextra -Werror -std=c++89" + - env: NUT_MATRIX_TAG="gnu89-gcc-default-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu89" CXXFLAGS="-Wall -Wextra -Werror -std=gnu++89" ### macosx #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu17" CXXFLAGS="-std=gnu++17" CC=clang CXX=clang++ #OK# - env: NUT_MATRIX_TAG="gnu99-clang-xcode7.3-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="gnu17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=gnu17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=gnu++17" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-nowarn" BUILD_TYPE=default-all-errors CFLAGS="-std=c17" CXXFLAGS="-std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode10.2-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c17-clang-xcode7.3-warn" BUILD_TYPE=default-all-errors CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c17" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++17" CC=clang CXX=clang++ ### windows - env: NUT_MATRIX_TAG="gnu99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=gnu99" CXXFLAGS="-std=gnu++99" CC=clang CXX=clang++ - env: NUT_MATRIX_TAG="c99-clang-win-nowarn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-std=c99" CXXFLAGS="-std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ - - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror=implicit-fallthrough=3 -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c99-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c99" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++99" CC=clang CXX=clang++ + - env: NUT_MATRIX_TAG="c20-clang-win-warn" BUILD_TYPE=default-all-errors CPPFLAGS="-fms-extensions" CFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -pedantic -std=c20" CXXFLAGS="-Wall -Wextra -Werror -Weverything -Wno-unused-macros -std=c++20" CC=clang CXX=clang++ before_install: - |-