Krolyxon
Commit 598f4c7

Branches

Refs →

nsxiv598f4c7

add additional warning and -Werror to github workflow

Author
NRK
Date
2021-12-29 19:48 +0600
Committer
N-R-K · 2022-01-06 17:53 +0000
Parent
8cc5cee
Commit
598f4c7855a8ce537b1eeeb2c5c032bb27a39e8e

+18 −0

1 file changed

  1. M .github/workflows/build.yml +18 −0
M .github/workflows/build.yml View
@@ -19,6 +19,15 @@ jobs:
1919 gcc clang >/dev/null
2020 git clone --quiet --depth 1 'https://github.com/TinyCC/tinycc.git'
2121 ( 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
2231 export OPT_DEP_DEFAULT=1
2332 echo "### GCC BUILD ###" && make clean && CC=gcc make -s
2433 echo "### CLANG BUILD ###" && make clean && CC=clang make -s
@@ -35,6 +44,15 @@ jobs:
3544 sudo apt-get remove libxft2 libxft-dev libexif12 libexif-dev >/dev/null
3645 git clone --quiet --depth 1 'https://github.com/TinyCC/tinycc.git'
3746 ( 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
3856 export OPT_DEP_DEFAULT=0
3957 echo "### GCC BUILD ###" && make clean && CC=gcc make -s
4058 echo "### CLANG BUILD ###" && make clean && CC=clang make -s