summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2019-04-02 12:46:26 -0700
committerBen Chan <benchan@chromium.org>2019-04-02 12:54:04 -0700
commit67ba57f89fd3a2f4b280361e650eaef0057baeaa (patch)
treeb3c62375841cebbff66db0a3a8a1b9fb10be11e3
parentcdf25b2853257d986e4a3c00993182d39649395f (diff)
downloadlibmbim-67ba57f89fd3a2f4b280361e650eaef0057baeaa.tar.gz
build: make compiler warning options compatible with clang
This patch updates m4/compiler-warnings.m4 as follows to make it more compatible with clang: * clang doesn't support -Wunused-but-set-variable, which can be replaced with -Wunused-variable as the latter covers unused variables with or without an assigned value and is supported by gcc and clang. * -Wno-unused-function is added to let clang ignore unused functions that are auto-generated by mbim-codegen.
-rw-r--r--m4/compiler-warnings.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4
index 77b79c5..9d72297 100644
--- a/m4/compiler-warnings.m4
+++ b/m4/compiler-warnings.m4
@@ -11,7 +11,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wdeclaration-after-statement -Wstrict-prototypes \
-fno-strict-aliasing -Wno-deprecated-declarations \
-Wint-to-pointer-cast -Wfloat-equal -Wno-unused-parameter \
- -Wno-sign-compare -Wunused-but-set-variable \
+ -Wno-sign-compare -Wunused-variable -Wno-unused-function \
-Wundef -Wimplicit-function-declaration \
-Wpointer-arith -Winit-self -Wshadow \
-Wmissing-include-dirs -Waggregate-return \