RTEMS | bsps/shared/.../gpio-support.c: Address maybe uninitialized warning (!1229)
Joel Sherrill (@joel)
gitlab at rtems.org
Wed May 6 19:44:59 UTC 2026
Joel Sherrill commented on a discussion on bsps/shared/dev/gpio/gpio-support.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1229#note_149554
> - ) == RTEMS_SUCCESSFUL )
> -
> -#define RELEASE_LOCK(m) assert ( rtems_semaphore_release(m) == RTEMS_SUCCESSFUL )
> +#define ACQUIRE_LOCK(m) \
> + do { \
> + sc = rtems_semaphore_obtain(_m, RTEMS_WAIT, RTEMS_NO_TIMEOUT); \
> + _Assert( sc == RTEMS_SUCCESSFUL ); \
> + (void) sc; \
> + while (0)
> +
> +#define RELEASE_LOCK(_m) \
> + do { \
> + sc = rtems_semaphore_release(_m); \
> + _Assert( sc == RTEMS_SUCCESSFUL ); \
> + (void) sc; \
> + while (0)
That may be possible but the code has a single mutex plus an array of them. I am happy to resolve this with an issue but I think this is too big a change to make under the banner of "fixing warnings" without a way to test. Can I resolve with an issue?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1229#note_149554
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/20260506/c07a3013/attachment-0001.htm>
More information about the bugs
mailing list