RTEMS | libfdt: Replace deprecated 0-length arrays with proper flexible arrays (!426)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Sat Feb 15 15:47:08 UTC 2025
Sebastian Huber created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/426
Project:Branches: sebhub/rtems:update-dtc to rtems/rtos/rtems:main
Author: Sebastian Huber
Assignee: Sebastian Huber
## Summary
libfdt: Replace deprecated 0-length arrays with proper flexible arrays
Replace the 0-length arrays in structures with proper flexible
arrays. This will avoid warnings when building under GCC 13 with
-fstrict-flex-arrays, which the Linux kernel will be doing soon:
In file included from ../lib/fdt_ro.c:2:
../lib/../scripts/dtc/cpukit/dtc/libfdt/fdt_ro.c: In function 'fdt_get_name':
../lib/../scripts/dtc/cpukit/dtc/libfdt/fdt_ro.c:319:24: warning: 'strrchr' reading 1 or more bytes from a region of size 0 [-Wstringop-overread]
319 | leaf = strrchr(nameptr, '/');
| ^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Kees Cook <keescook at chromium.org>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
<!-- 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/426
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/20250215/1abd82fc/attachment.htm>
More information about the bugs
mailing list