]> git.itanic.dy.fi Git - linux-stable/commit
Makefile: Move -Wno-unused-but-set-variable out of GCC only block
authorNathan Chancellor <nathan@kernel.org>
Thu, 29 Apr 2021 01:23:50 +0000 (18:23 -0700)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:48:56 +0000 (08:48 -0400)
commit8e64fac312b258681988d0330cad911fa27c980f
treeff86258a44dffb38bda8bdcf40297be7ff8b334e
parentaf115fa3d6fc530f10f3045d889ee4488c756675
Makefile: Move -Wno-unused-but-set-variable out of GCC only block

commit 885480b084696331bea61a4f7eba10652999a9c1 upstream.

Currently, -Wunused-but-set-variable is only supported by GCC so it is
disabled unconditionally in a GCC only block (it is enabled with W=1).
clang currently has its implementation for this warning in review so
preemptively move this statement out of the GCC only block and wrap it
with cc-disable-warning so that both compilers function the same.

Cc: stable@vger.kernel.org
Link: https://reviews.llvm.org/D100581
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
[nc: Backport, workaround lack of e2079e93f562 in older branches]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile