Skip to content

Commit

Permalink
kbuild: Remove unnecessary -Wno-unused-value
Browse files Browse the repository at this point in the history
This flag turns off several other warnings that would
be useful. Most notably -warn_unused_result is disabled.
All of the following warnings are currently disabled:

UnusedValue
|-UnusedComparison
  |-warn_unused_comparison
|-UnusedResult
  |-warn_unused_result
|-UnevaluatedExpression
  |-PotentiallyEvaluatedExpression
    |-warn_side_effects_typeid
  |-warn_side_effects_unevaluated_context
|-warn_unused_expr
|-warn_unused_voidptr
|-warn_unused_container_subscript_expr
|-warn_unused_call

With this flag removed there are ~10 warnings.
Patches have been submitted for each of these warnings.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: clang-built-linux@googlegroups.com
Link: ClangBuiltLinux/linux#520
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
nhukc authored and masahir0y committed Jun 23, 2019
1 parent 72ad210 commit 4df607c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion scripts/Makefile.extrawarn
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ else

ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Wno-initializer-overrides
KBUILD_CFLAGS += -Wno-unused-value
KBUILD_CFLAGS += -Wno-format
KBUILD_CFLAGS += -Wno-sign-compare
KBUILD_CFLAGS += -Wno-format-zero-length
Expand Down

0 comments on commit 4df607c

Please sign in to comment.