diff options
author | Ben Chan <benchan@chromium.org> | 2019-04-02 13:54:07 -0700 |
---|---|---|
committer | Ben Chan <benchan@chromium.org> | 2019-04-02 13:54:07 -0700 |
commit | 686e60ac276298b23e86db709ff3c2b81f73a006 (patch) | |
tree | 8a29badb7df27655d2481439b8f82024c2d25f46 /m4 | |
parent | d9a1c9a4038f17bff26da8d382adf79900b4898e (diff) |
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 qmi-codegen.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/compiler-warnings.m4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4 index 5ba490c..0931acd 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 \ |