Skip to content

Commit

Permalink
ci:upd-tg: check extra warnings W=1
Browse files Browse the repository at this point in the history
This can detect -Wset-but-not-used-variable warning and others.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Change-Id: Id119c54d15e20151c8f933e1e651d9b484d2a709
  • Loading branch information
matttbe committed Mar 24, 2020
1 parent fc630ac commit 2069cff
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ci/update-tg-tree.sh
Expand Up @@ -233,6 +233,14 @@ check_compilation_no_ipv6() {
compile_kernel "without IPv6 and with CONFIG_MPTCP" || return 1
}

check_compilation_extra_warnings() { local src obj
for src in net/mptcp/*.c; do
obj="${src/%.c/.o}"
touch "${src}"
KCFLAGS="-Werror" make W=1 "${obj}" || return 1
done
}

# $1: branch
tg_has_non_mptcp_modified_files() {
git diff --name-only "refs/top-bases/${1}..refs/heads/${1}" | \
Expand Down Expand Up @@ -278,6 +286,11 @@ validation() { local curr_branch
return 1
fi

if ! check_compilation_extra_warnings; then
err "Unable to compile mptcp source code with W=1"
return 1
fi

if ! check_compilation_no_ipv6; then
err "Unable to compile without IPv6"
return 1
Expand Down

0 comments on commit 2069cff

Please sign in to comment.