On Wed, Apr 16, 2025 at 10:45:17AM -0700, Kees Cook wrote: > 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<MN?"; > | ^~~~~~~~~~~~~~~~~~ > > Add the annotation and While at it, mark the table as const too. > > Signed-off-by: Kees Cook <[email protected]>
Applied, thank you. -- Dmitry
