RTEMS | Waranings in cpukit dev/can (#5388)
Joel Sherrill (@joel)
gitlab at rtems.org
Sun Nov 2 17:26:24 UTC 2025
Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5388
Assignee: Gedare Bloom
## Summary
Tjere are multiple -Wtype-limits and -Wsign-compare warnings in cpukit/dev/can that need to be addressed by someone familiar with this code.
```
../../../cpukit/dev/can/can-bus.c:236:20: warning: comparison is always false due to limited range of data type [-Wtype-limits]
../../../cpukit/dev/can/can-bus.c:237:23: warning: comparison is always false due to limited range of data type [-Wtype-limits]
../../../cpukit/dev/can/can-bus.c:252:23: warning: comparison is always false due to limited range of data type [-Wtype-limits]
../../../cpukit/dev/can/ctucanfd/ctucanfd.c:170:18: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
../../../cpukit/dev/can/ctucanfd/ctucanfd.c:1799:16: warning: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'unsigned int'} [-Wsign-compare]
../../../cpukit/dev/can/ctucanfd/ctucanfd.c:233:18: warning: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
../../../cpukit/dev/can/ctucanfd/ctucanfd.c:245:18: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
../../../cpukit/dev/can/ctucanfd/ctucanfd.c:418:19: warning: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Wsign-compare]
../../../cpukit/dev/can/ctucanfd/ctucanfd.c:988:18: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
../../../cpukit/include/dev/can/can-impl.h:72:54: warning: comparison of integer expressions of different signedness: 'atomic_uint' {aka 'unsigned int'} and 'int' [-Wsign-compare]
```
## Steps to reproduce
Enable these warnings or -Wextra and disable -Werror in spec/build/cpukit/optwarn.yml
<!-- Pre-set options
- milestone
-->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5388
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/20251102/f0558ea0/attachment.htm>
More information about the bugs
mailing list