RTEMS | cpukit libfs: Address -Wsign-compare warnings (!934)

Joel Sherrill (@joel) gitlab at rtems.org
Thu Jan 22 17:20:00 UTC 2026



Joel Sherrill created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/934

Project:Branches: joel/rtems:fix-libfs-sign-compare-warnings to rtems/rtos/rtems:main
Author:   Joel Sherrill
Assignee: Joel Sherrill



## Summary

cpukit libfs: Address -Wsign-compare warnings

Also includes a related libio change.

Most of these warnings were between int or ssize_t and size_t.
In particular, various POSIX system calls like read() and write()
return ssize_t and comparing that value with the sizeof a buffer
is a common source of these warnings. Another common source is
using an int as the iterator in a for loop with the limit being
a size_t.

With the type change, some printf() specifiers needed to change also.


<!-- 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/934
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/20260122/73b2613c/attachment.htm>


More information about the bugs mailing list