RTEMS | bsps/*acpi*: Address unterminated string warnings (!734)
Joel Sherrill (@joel)
gitlab at rtems.org
Fri Sep 19 17:12:54 UTC 2025
Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/734
Project:Branches: joel/rtems:fix-unterminated-strings-warning to rtems/rtos/rtems:main
Author: Joel Sherrill
Assignee: Joel Sherrill
Reviewers: Kinsey Moore and Gedare Bloom
## Summary
bsps/*acpi*: Address unterminated string warnings
The ACPI source has multiple tables where a Name field is defined.
The name field is a character array with a length of 4. All of the
string initializers are four characters plus a NUL. The code is
careful to use strn*() functions and intentionally avoids assuming
there is space for the NUL. With lots of entries in the various
arrays, this was clearly a design decision to save space.
This was caught by GCC's -Wunterminated-string-initialization
warning. The solution used is to use the "nonstring" attribute
recommended by the GCC manual.
Closes #5329
<!-- Default settings, if it is a dropdown it will set after submission -->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/734
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250919/75b51545/attachment.htm>
More information about the bugs
mailing list