Skip to content

Conversation

@downquark7
Copy link
Contributor

Including space for the null terminator in this string fixes a warning that was not added to gcc until version 15. Compile code with gcc version 15 to reproduce this error.

In file included from panda/board/bootstub.c:18:
panda/board/obj/gitversion.h:2:32: error: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (19 chars into 18 available) [-Werror=unterminated-string-initialization]
    2 | const uint8_t gitversion[18] = "DEV-5f3c09c9-DEBUG";
      |                                ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
scons: *** [panda/board/board/obj/body_h7bootstub.o] Error 1
scons: building terminated because of errors.

@adeebshihadeh adeebshihadeh merged commit e42367d into commaai:master Dec 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants