RTEMS | bsps/shared/.../gpio-support.c: Address maybe uninitialized warning (!1229)
Joel Sherrill (@joel)
gitlab at rtems.org
Tue May 5 13:43:37 UTC 2026
Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1229
Project:Branches: joel/rtems:gpio-maybe-uninitialized to rtems/rtos/rtems:main
Author: Joel Sherrill
Assignee: Joel Sherrill
## Summary
bsps/shared/.../gpio-support.c: Address maybe uninitialized warning
This code was flagged as maybe-uninitialized when compiling at -Og.
The underlying problem was functional code in an assert(). If
compiled with asserts disabled, there would have been no mutex
lock/unlock. Changed the macros to obtain and release the mutex
independent of assert() being enabled or not and switched to using
the RTEMS assert _Assert() which lets this check follow the
RTEMS_DEBUG setting.
## Generative AI
<!-- If you have used AI please use the "AI Contribution" template otherwise leave this blank see our fulls statement at https://www.rtems.org/generative-ai/-->
Only humans were involved in the creation of this MR.
<!-- 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/1229
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/20260505/468d2213/attachment.htm>
More information about the bugs
mailing list