summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-04-16 15:16:55 -0700
committerChristian Brauner <brauner@kernel.org>2025-04-17 10:13:46 +0200
commit58db1c3cd0ce857e7210b0a95908900c25c28c3e (patch)
tree0cdf61ab039df4d9b9bc82c575e25f2d80fb5d05 /tools/testing/selftests/bpf/progs/test_autoload.c
parent0a65bc27bd645894175c059397b4916e31955fb2 (diff)
downloadlinux-58db1c3cd0ce857e7210b0a95908900c25c28c3e.tar.gz
linux-58db1c3cd0ce857e7210b0a95908900c25c28c3e.tar.bz2
linux-58db1c3cd0ce857e7210b0a95908900c25c28c3e.zip
netfs: Mark __nonstring lookup tables
GCC 15's new -Wunterminated-string-initialization notices that the character lookup tables "fscache_cache_states" and "fscache_cookie_states" (which are not used as a C-String) need to be marked as "nonstring": fs/netfs/fscache_cache.c:375:67: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Wunterminated-string-initialization] 375 | static const char fscache_cache_states[NR__FSCACHE_CACHE_STATE] = "-PAEW"; | ^~~~~~~ fs/netfs/fscache_cookie.c:32:69: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (11 chars into 10 available) [-Wunterminated-string-initialization] 32 | static const char fscache_cookie_states[FSCACHE_COOKIE_STATE__NR] = "-LCAIFUWRD"; | ^~~~~~~~~~~~ Annotate the arrays. Signed-off-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/20250416221654.work.028-kees@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions