ci: really turn on warnings
We didn't have `-Wall` in our `CFLAGS`. It's normally injected by `configure.ac`, but because we *did* have `-Werror`, it was skipped. Now, we just turn it on unconditionally directly in `build.sh`. Closes: #1245 Approved by: cgwalters
This commit is contained in:
parent
43977dffde
commit
8a61f54239
|
|
@ -28,14 +28,13 @@ if test -x /usr/bin/gnome-desktop-testing-runner; then
|
||||||
gnome-desktop-testing-runner -L ${resultsdir}/gdtr-results -p 0 ${INSTALLED_TESTS_PATTERN:-libostree/}
|
gnome-desktop-testing-runner -L ${resultsdir}/gdtr-results -p 0 ${INSTALLED_TESTS_PATTERN:-libostree/}
|
||||||
fi
|
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
|
# 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
|
# job than gcc for vars with cleanups; perhaps in the future these could
|
||||||
# parallelize
|
# parallelize
|
||||||
|
if test -x /usr/bin/clang; then
|
||||||
|
# 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="-Wall -Werror -Wno-error=unused-command-line-argument ${CFLAGS:-}"
|
||||||
|
git clean -dfx && git submodule foreach git clean -dfx
|
||||||
export CC=clang
|
export CC=clang
|
||||||
build
|
build
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,6 @@ if test -n "${CI_PKGS:-}"; then
|
||||||
fi
|
fi
|
||||||
pkg_install_if_os fedora gjs gnome-desktop-testing parallel coccinelle clang
|
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:-}"
|
|
||||||
|
|
||||||
# Default libcurl on by default in fedora unless libsoup is enabled
|
# Default libcurl on by default in fedora unless libsoup is enabled
|
||||||
if sh -c '. /etc/os-release; test "${ID}" = fedora'; then
|
if sh -c '. /etc/os-release; test "${ID}" = fedora'; then
|
||||||
case "${CONFIGOPTS:-}" in
|
case "${CONFIGOPTS:-}" in
|
||||||
|
|
@ -36,4 +33,8 @@ case "${CONFIGOPTS:-}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# always fail on warnings; https://github.com/ostreedev/ostree/pull/971
|
||||||
|
# NB: this disables the default set of flags from configure.ac
|
||||||
|
export CFLAGS="-Wall -Werror ${CFLAGS:-}"
|
||||||
|
|
||||||
build --enable-gtk-doc ${CONFIGOPTS:-}
|
build --enable-gtk-doc ${CONFIGOPTS:-}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue