Skip to content

Commit

Permalink
CI: add more -Werror-* flags
Browse files Browse the repository at this point in the history
Error out on all warning cases that we have fixed before to make sure nothing
comes in again.
  • Loading branch information
DerDakon committed Oct 29, 2023
1 parent b230161 commit d74c344
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Expand Up @@ -14,7 +14,7 @@ task:
pkginstall_script:
- pkg install -y groff pkgconf check
configure_script:
- echo "clang -O2 -Wall -Wshadow -Werror=implicit-function-declaration -Werror=deprecated-declarations" > conf-cc
- echo "clang -O2 -Wall -Wshadow -Werror=implicit-function-declaration -Werror=deprecated-declarations -Werror=parentheses -Werror=dangling-else -Werror=pointer-sign -Werror=incompatible-library-redeclaration -Werror=empty-body -Werror=pointer-sign" > conf-cc
compile_script:
- make ${MAKE_FLAGS} it man
test_script:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ccpp.yml
Expand Up @@ -21,22 +21,23 @@ jobs:
cc: gcc,
nroff: nroff,
utmp: false,
cflags: "",
cflags: "-Werror=deprecated-declarations",
makeflags: ""
}
- {
name: gcc-no_obsolete,
cc: gcc,
nroff: nroff,
utmp: false,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED -Werror=deprecated-declarations",
makeflags: ""
}
- {
name: gcc-utmp,
cc: gcc,
nroff: true,
utmp: true,
# no deprecated-declarations here as utmp is deprecated on MacOS and that would break the build
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
makeflags: "-o qtmp.h"
}
Expand All @@ -45,23 +46,24 @@ jobs:
cc: clang,
nroff: nroff,
utmp: false,
cflags: "",
cflags: "-Werror=incompatible-library-redeclaration -Werror=deprecated-declarations",
makeflags: ""
}
- {
name: clang-no_obsolete,
cc: clang,
nroff: true,
utmp: false,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED -Werror=incompatible-library-redeclaration -Werror=deprecated-declarations",
makeflags: ""
}
- {
name: clang-utmp,
cc: clang,
nroff: true,
utmp: true,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
# no deprecated-declarations here as utmp is deprecated on MacOS and that would break the build
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED -Werror=incompatible-library-redeclaration",
makeflags: "-o qtmp.h"
}

Expand All @@ -81,7 +83,7 @@ jobs:
OS: ${{ matrix.host }}

- name: configure
run: echo "${CC} -O2 -fPIC -Wall -Wshadow -Werror=implicit-function-declaration -Wimplicit-fallthrough ${CFLAGS}" > conf-cc
run: echo "${CC} -O2 -fPIC -Wall -Wshadow -Werror=implicit-function-declaration -Werror=parentheses -Werror=dangling-else -Werror=pointer-sign -Werror=pointer-sign ${CFLAGS}" > conf-cc
env:
CC: ${{ matrix.config.cc }}
CFLAGS: ${{ matrix.config.cflags }}
Expand Down

0 comments on commit d74c344

Please sign in to comment.