ci: unconditionally turn on -Werror
authorJonathan Lebon <jlebon@redhat.com>
Wed, 28 Jun 2017 15:59:36 +0000 (08:59 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 28 Jun 2017 16:37:15 +0000 (16:37 +0000)
Closes: #971
Approved by: cgwalters

.papr.yml
ci/build-check.sh
ci/build.sh

index be4c4f043d25b2afe78a8ac04655e9cff5c74018..ac7c3278a43800198da581430b91e69f3762ebcc 100644 (file)
--- a/.papr.yml
+++ b/.papr.yml
@@ -14,7 +14,7 @@ packages:
 env:
     # Enable all the sanitizers for this primary build.
     # We only use -Werror=maybe-uninitialized here with a "fixed" toolchain
-    CFLAGS: '-fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2 -Werror=maybe-uninitialized'
+    CFLAGS: '-fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2'
     # Only for CI with a known g-ir-scanner
     GI_SCANNERFLAGS: '--warn-error'
     ASAN_OPTIONS: 'detect_leaks=0'  # Right now we're not fully clean, but this gets us use-after-free etc
index da03f3cc9a0550f33098bc4a5bf3aacacc01c9c1..677515b3235b71454080524200674c969c8d3f11 100755 (executable)
@@ -16,9 +16,9 @@ fi
 
 if test -x /usr/bin/clang; then
     git clean -dfx && git submodule foreach git clean -dfx
-    # And now a clang build to find unused variables; perhaps
-    # in the future these could parallelize
+    # And now a clang build to find unused variables because it does a better
+    # job than gcc for vars with cleanups; perhaps in the future these could
+    # parallelize
     export CC=clang
-    export CFLAGS='-Werror=unused-variable'
     build
 fi
index eefb7c3ca5c08e5a1f6fb0fd4400932b1017d848..a9a8ac3fb88eaffea933a8ed6a83a126a9cdae40 100755 (executable)
@@ -12,6 +12,9 @@ pkg_install sudo which attr fuse \
     elfutils
 pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang
 
+# always fail on warnings; https://github.com/ostreedev/ostree/pull/971
+export CFLAGS="-Werror ${CFLAGS:-}"
+
 DETECTED_CONFIGOPTS=
 if test -x /usr/bin/gnome-desktop-testing-runner; then
     DETECTED_CONFIGOPTS="${DETECTED_CONFIGOPTS} --enable-installed-tests=exclusive"