From 67ba57f89fd3a2f4b280361e650eaef0057baeaa Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Tue, 2 Apr 2019 12:46:26 -0700 Subject: 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. --- m4/compiler-warnings.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 \ -- cgit v1.2.1