nsxiv598f4c7
add additional warning and -Werror to github workflow
+18 −0
1 file changed
- M .github/workflows/build.yml +18 −0
| @@ -19,6 +19,15 @@ jobs: | |||
| 19 | 19 | gcc clang >/dev/null | |
| 20 | 20 | git clone --quiet --depth 1 'https://github.com/TinyCC/tinycc.git' | |
| 21 | 21 | ( cd tinycc && ./configure && make && sudo make install; ) >/dev/null | |
| 22 | + | # vanilla flags | |
| 23 | + | CFLAGS="-std=c99 -Wall -pedantic" | |
| 24 | + | # extra flags | |
| 25 | + | CFLAGS+=" -Werror -Wextra -Wshadow -Wvla -Wpointer-arith -Wstrict-prototypes" | |
| 26 | + | CFLAGS+=" -Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code" | |
| 27 | + | CFLAGS+=" -Wbad-function-cast -Wdeclaration-after-statement" | |
| 28 | + | # silence | |
| 29 | + | CFLAGS+=" -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers" | |
| 30 | + | export CFLAGS | |
| 22 | 31 | export OPT_DEP_DEFAULT=1 | |
| 23 | 32 | echo "### GCC BUILD ###" && make clean && CC=gcc make -s | |
| 24 | 33 | echo "### CLANG BUILD ###" && make clean && CC=clang make -s | |
| @@ -35,6 +44,15 @@ jobs: | |||
| 35 | 44 | sudo apt-get remove libxft2 libxft-dev libexif12 libexif-dev >/dev/null | |
| 36 | 45 | git clone --quiet --depth 1 'https://github.com/TinyCC/tinycc.git' | |
| 37 | 46 | ( cd tinycc && ./configure && make && sudo make install; ) >/dev/null | |
| 47 | + | # vanilla flags | |
| 48 | + | CFLAGS="-std=c99 -Wall -pedantic" | |
| 49 | + | # extra flags | |
| 50 | + | CFLAGS+=" -Werror -Wextra -Wshadow -Wvla -Wpointer-arith -Wstrict-prototypes" | |
| 51 | + | CFLAGS+=" -Wundef -Wstrict-overflow=4 -Wwrite-strings -Wunreachable-code" | |
| 52 | + | CFLAGS+=" -Wbad-function-cast -Wdeclaration-after-statement" | |
| 53 | + | # silence | |
| 54 | + | CFLAGS+=" -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers" | |
| 55 | + | export CFLAGS | |
| 38 | 56 | export OPT_DEP_DEFAULT=0 | |
| 39 | 57 | echo "### GCC BUILD ###" && make clean && CC=gcc make -s | |
| 40 | 58 | echo "### CLANG BUILD ###" && make clean && CC=clang make -s | |