]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
lib/ubsan.c: mark type_check_kinds with static keyword
authorZou Wei <zou_wei@huawei.com>
Wed, 16 Dec 2020 04:46:50 +0000 (20:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 06:46:19 +0000 (22:46 -0800)
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 <zou_wei@huawei.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/ubsan.c

index cb9af3f6b77e3413df8be82728acb6bf1d8e9194..3e3352f3d0da7b9e9f764bf7eb106463872f0a3e 100644 (file)
@@ -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",