RTEMS | rfs: fix -Wsign-compare warnings (!892)

Chris Johns (@chris) gitlab at rtems.org
Thu Jan 8 04:16:55 UTC 2026



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/892 was reviewed by Chris Johns

--
  
Chris Johns started a new discussion on cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/892#note_138112

 >  
 > -  if (bit >= control->size)
 > +  if (bit < 0 || (size_t)bit >= control->size)

1. Would making `size` in `rtems_rfs_bitmap_control` `int32` work?
2. What happens if `rtems_rfs_bitmap_bit` becomes `size_t`? The `bit < 0` checks would need to be removed.


-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/892
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/20260108/4c3922b0/attachment.htm>


More information about the bugs mailing list