diff options
| author | Zou Wei <[email protected]> | 2020-12-16 04:46:50 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-12-16 06:46:19 +0000 |
| commit | d3c227978a130ee18716d3496cf82621d8cda28c (patch) | |
| tree | c313adcac27c95b8e0012d9efdfaa9c6c06d082c | |
| parent | kcov: don't instrument with UBSAN (diff) | |
| download | kernel-d3c227978a130ee18716d3496cf82621d8cda28c.tar.gz kernel-d3c227978a130ee18716d3496cf82621d8cda28c.zip | |
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?
[[email protected]: make it `static const char * const' while we're in there]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Zou Wei <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | lib/ubsan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ubsan.c b/lib/ubsan.c index cb9af3f6b77e..3e3352f3d0da 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", |
