-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
hal/drivers/mesa-hostmot2/llio_info.c:173:31: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (9 chars into 8 available) [-Wunterminated-string-initialization]
173 | .board_name = "MESA7C80",
| ^~~~~~~~~~
hal/drivers/mesa-hostmot2/llio_info.c:184:31: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (9 chars into 8 available) [-Wunterminated-string-initialization]
184 | .board_name = "MESA7C81",
| ^~~~~~~~~~
hal/drivers/mesa-hostmot2/llio_info.c:195:31: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (9 chars into 8 available) [-Wunterminated-string-initialization]
195 | .board_name = "MESA7I90",
| ^~~~~~~~~~
hal/drivers/mesa-hostmot2/llio_info.c:206:31: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (9 chars into 8 available) [-Wunterminated-string-initialization]
206 | .board_name = "MESA7I43"
and indeed
hal/drivers/mesa-hostmot2/hostmot2.h: rtapi_u8 board_name[8]; // ascii string, but not NULL terminated!
I suggest to follow the advice and add the https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#nonstring .
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels