RTEMS | Address type-limits warnings (!853)
Joel Sherrill (@joel)
gitlab at rtems.org
Tue Nov 25 21:22:49 UTC 2025
Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/853
Project:Branches: joel/rtems:fix-more-type-limits-warnings to rtems/rtos/rtems:main
Author: Joel Sherrill
Assignee: Joel Sherrill
Reviewer: Kinsey Moore
## Summary
These changes were made to address GCC -Wtype-limits warnings. Many times, it is comparison of an unsigned integer to be within the range 0..some_limit (X >= 0 && X <= some_limit). Since the type is unsigned, it cannot be <0. In other cases, the code was using an unsigned type where a return value was signed and -1 was an error. Comments were added in many cases to explain the removal of checks.
<!-- 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/853
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/20251125/2888b965/attachment.htm>
More information about the bugs
mailing list