diff options
author | Colin Walters <walters@verbum.org> | 2017-07-20 15:34:15 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-07-21 20:45:47 +0000 |
commit | 0ded552cf1440a806bd7af684b63f486c03d67c9 (patch) | |
tree | 93f4bdec698826cabfb43e60a2f52460c783a232 /ci | |
parent | ed99b4169e06c6a204f92e85b3e323abdb542bbe (diff) | |
download | ostree-0ded552cf1440a806bd7af684b63f486c03d67c9.tar.gz |
ci: Enable -Werror for clang
I hit an unused-variable warning with `GLNX_AUTO_PREFIX_ERROR` for
rpm-ostree and led me to wonder why ostree didn't fail, then I noticed
we had lost the special `-Werror=unused-variable` bit. Let's go
ahead and use `-Werror` for clang too.
Closes: #1023
Approved by: jlebon
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/build-check.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ci/build-check.sh b/ci/build-check.sh index 0e12000f..7df1f424 100755 --- a/ci/build-check.sh +++ b/ci/build-check.sh @@ -15,6 +15,9 @@ if test -x /usr/bin/gnome-desktop-testing-runner; then fi if test -x /usr/bin/clang; then + # always fail on warnings; https://github.com/ostreedev/ostree/pull/971 + # Except for clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument] + export CFLAGS="-Wno-error=unused-command-line-argument -Werror ${CFLAGS:-}" git clean -dfx && git submodule foreach git clean -dfx # 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 |