From: Zou Wei Date: Wed, 16 Dec 2020 04:46:50 +0000 (-0800) Subject: lib/ubsan.c: mark type_check_kinds with static keyword X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d3c227978a130ee18716d3496cf82621d8cda28c;p=linux.git lib/ubsan.c: mark type_check_kinds with static keyword Fix the following sparse warning: lib/ubsan.c:20:12: warning: symbol 'type_check_kinds' was not declared. Should it be static? [akpm@linux-foundation.org: make it `static const char * const' while we're in there] Link: https://lkml.kernel.org/r/1607602638-79584-1-git-send-email-zou_wei@huawei.com Signed-off-by: Zou Wei Reviewed-by: Andrew Morton Reviewed-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/ubsan.c b/lib/ubsan.c index cb9af3f6b77e3..3e3352f3d0da7 100644 --- a/lib/ubsan.c +++ b/lib/ubsan.c @@ -17,7 +17,7 @@ #include "ubsan.h" -const char *type_check_kinds[] = { +static const char * const type_check_kinds[] = { "load of", "store to", "reference binding to",