diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 08:06:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 08:06:26 +0000 |
commit | 1660d4b7a65d9ad2ce0deaa19d35579ca4084ac5 (patch) | |
tree | 6cf8220b628ebd2ccfc1375dd6516c6996e9abcc /.gitlab/ci/gcc-Wall | |
parent | Initial commit. (diff) | |
download | cryptsetup-1660d4b7a65d9ad2ce0deaa19d35579ca4084ac5.tar.xz cryptsetup-1660d4b7a65d9ad2ce0deaa19d35579ca4084ac5.zip |
Adding upstream version 2:2.6.1.upstream/2%2.6.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.gitlab/ci/gcc-Wall')
-rwxr-xr-x | .gitlab/ci/gcc-Wall | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/.gitlab/ci/gcc-Wall b/.gitlab/ci/gcc-Wall new file mode 100755 index 0000000..6669504 --- /dev/null +++ b/.gitlab/ci/gcc-Wall @@ -0,0 +1,57 @@ +#!/bin/bash +# gcc -Wall plus other important warnings not included in -Wall + +for arg in "$@" +do + case $arg in + -O*) Wuninitialized=-Wuninitialized;; # only makes sense with `-O' + esac +done + +GCC="gcc${COMPILER_VERSION:+-$COMPILER_VERSION}" + +#PEDANTIC="-std=gnu99" +#PEDANTIC="-pedantic -std=gnu99" +#PEDANTIC="-pedantic -std=gnu99 -Wno-variadic-macros" +#CONVERSION="-Wconversion" +# -Wpacked \ + +# This does more than expected for gcc (mixed code with declarations) +# -Wdeclaration-after-statement \ + +EXTRA="-Wextra \ + -Wsign-compare \ + -Werror-implicit-function-declaration \ + -Wpointer-arith \ + -Wwrite-strings \ + -Wswitch \ + -Wmissing-format-attribute \ + -Wstrict-aliasing=3 \ + -Winit-self \ + -Wunsafe-loop-optimizations \ + -Wold-style-definition \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wno-long-long \ + -Wmaybe-uninitialized \ + -Wvla \ + -Wformat-overflow \ + -Wformat-truncation" + +exec $GCC $PEDANTIC $CONVERSION \ + -Wall $Wuninitialized \ + -Wno-switch \ + -Wdisabled-optimization \ + -Wwrite-strings \ + -Wpointer-arith \ + -Wbad-function-cast \ + -Wmissing-prototypes \ + -Wmissing-declarations \ + -Wstrict-prototypes \ + -Wnested-externs \ + -Wcomment \ + -Winline \ + -Wcast-align=strict \ + -Wcast-qual \ + -Wredundant-decls $EXTRA \ + "$@" |