diff options
| author | Linus Torvalds <[email protected]> | 2025-04-20 18:18:55 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2025-04-20 18:57:54 +0000 |
| commit | 05e8d261a34e5c637e37be55c26e42cf5c75ee5c (patch) | |
| tree | 946d1ca767a6a84ef9be07834eca6e997626f5a3 /fs/cachefiles/key.c | |
| parent | gcc-15: get rid of misc extra NUL character padding (diff) | |
| download | kernel-05e8d261a34e5c637e37be55c26e42cf5c75ee5c.tar.gz kernel-05e8d261a34e5c637e37be55c26e42cf5c75ee5c.zip | |
gcc-15: add '__nonstring' markers to byte arrays
All of these cases are perfectly valid and good traditional C, but hit
by the "you're not NUL-terminating your byte array" warning.
And none of the cases want any terminating NUL character.
Mark them __nonstring to shut up gcc-15 (and in the case of the ak8974
magnetometer driver, I just removed the explicit array size and let gcc
expand the 3-byte and 6-byte arrays by one extra byte, because it was
the simpler change).
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/cachefiles/key.c')
| -rw-r--r-- | fs/cachefiles/key.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cachefiles/key.c b/fs/cachefiles/key.c index bf935e25bdbe..b48525680e73 100644 --- a/fs/cachefiles/key.c +++ b/fs/cachefiles/key.c @@ -8,7 +8,7 @@ #include <linux/slab.h> #include "internal.h" -static const char cachefiles_charmap[64] = +static const char cachefiles_charmap[64] __nonstring = "0123456789" /* 0 - 9 */ "abcdefghijklmnopqrstuvwxyz" /* 10 - 35 */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" /* 36 - 61 */ |
