From: Kees Cook Date: Tue, 15 Apr 2025 23:24:05 +0000 (-0700) Subject: input/joystick: magellan: Mark __nonstring look-up table const X-Git-Tag: v6.16-rc1~85^2~19 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ccf1d2b4a1d9ef4287ff51e634c626fd4683b10c;p=linux-block.git input/joystick: magellan: Mark __nonstring look-up table const GCC 15's new -Wunterminated-string-initialization notices that the 16 character lookup table "nibbles" (which is not used as a C-String) needs to be marked as "nonstring": drivers/input/joystick/magellan.c: In function 'magellan_crunch_nibbles': drivers/input/joystick/magellan.c:51:44: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Wunterminated-string-initialization] 51 | static unsigned char nibbles[16] = "0AB3D56GH9:K --- diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index d73389af4dd5..7622638e5bb8 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -48,7 +48,7 @@ struct magellan { static int magellan_crunch_nibbles(unsigned char *data, int count) { - static unsigned char nibbles[16] __nonstring = "0AB3D56GH9:K