Skip to content

Commit ba8fa6e

Browse files
committed
only enable -Werror in CI
Enabling -Werror by default sucks for everyone who isn't maintaining CDBA. By all means we should enable it in CI, but not for users and not for folks packaging it in distros. Remove it from the flags in meson.build, and use mesons built in option to enable it only in CI. See: https://embeddedartistry.com/blog/2017/05/22/werror-is-not-your-friend/ Signed-off-by: Caleb Connolly <[email protected]>
1 parent 18bae8d commit ba8fa6e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
if: ${{ matrix.variant == 'i386' }}
209209
run: |
210210
mkdir build
211-
CFLAGS="-m32" LDFLAGS="-m32" meson setup . build
211+
CFLAGS="-m32" LDFLAGS="-m32" meson setup --errorlogs --werror . build
212212
213213
- name: Meson init with cross compile
214214
if: ${{ matrix.variant == 'cross-compile' }}
@@ -228,13 +228,13 @@ jobs:
228228
echo "pkg_config_libdir = '${PKG_CONFIG_PATH}'" >> cross.txt
229229
cat cross.txt
230230
mkdir build
231-
meson setup --cross-file cross.txt . build
231+
meson setup --errorlogs --werror --cross-file cross.txt . build
232232
233233
- name: Meson init
234234
if: ${{ matrix.variant == '' }}
235235
run: |
236236
mkdir build
237-
meson setup . build
237+
meson setup --errorlogs --werror . build
238238
239239
- name: Compile
240240
run: ninja -C build

meson.build

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ compiler_cflags = ['-Wno-unused-parameter',
2626

2727
# TODO add clang specific options
2828
if compiler.get_id() == 'gcc'
29-
compiler_cflags += ['-Werror', # Only set it on GCC
30-
'-Wformat-signedness',
29+
compiler_cflags += ['-Wformat-signedness',
3130
'-Wduplicated-cond',
3231
'-Wduplicated-branches',
3332
'-Wvla-larger-than=1',

0 commit comments

Comments
 (0)