]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: clang: disable unused variable warnings only when constant
authorSodagudi Prasad <psodagud@codeaurora.org>
Tue, 6 Feb 2018 23:46:51 +0000 (15:46 -0800)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 7 Feb 2018 00:20:19 +0000 (09:20 +0900)
commita91ffe973892d88d1d3bf6ba7765aa77dd7a500f
tree626bf979c52f950d3ca284c4980fa1197f89f780
parent6a1ace31a9fea19063aa4c7f5197ef27b5eef615
kbuild: clang: disable unused variable warnings only when constant

Currently, GCC disables -Wunused-const-variable, but not
-Wunused-variable, so warns unused variables if they are
non-constant.

While, Clang does not warn unused variables at all regardless of
the const qualifier because -Wno-unused-const-variable is implied
by the stronger option -Wno-unused-variable.

Disable -Wunused-const-variable instead of -Wunused-variable so that
GCC and Clang work in the same way.

Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile