diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-03 12:49:34 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-12-10 09:34:37 +0300 |
commit | c9f2b8d45aa453ee58e66a9b0e7a54e170381585 (patch) | |
tree | bbcf64207d05fdb0daaca65aff0e342d50754c74 /Kconfig | |
parent | 5cac96f937021de3b0fbc60cdc6d6c4ee5b2456d (diff) | |
download | linux-c9f2b8d45aa453ee58e66a9b0e7a54e170381585.tar.xz |
modpost: remove unreachable code after fatal()
Now compilers can recognize fatal() never returns.
While GCC 4.5 dropped support for -Wunreachable-code, Clang is capable
of detecting the unreachable code.
$ make HOSTCC=clang HOSTCFLAGS=-Wunreachable-code-return
[snip]
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c:520:11: warning: 'return' will never be executed [-Wunreachable-code-return]
return 0;
^
scripts/mod/modpost.c:477:10: warning: 'return' will never be executed [-Wunreachable-code-return]
return 0;
^
2 warnings generated.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions