cpukit/dev: Address -Wsign-compare warnings

This warning occurs when comparing a signed variable to an unsigned one.
This addresses warnings that only occurred on 64-bit targets.  For the
ones which only appeared on 64-bit targets, the cause was frequently
a mismatch when comparing a combination off_t, ssize_t, and int.
This commit is contained in:
Joel Sherrill
2026-02-02 12:48:43 -06:00
parent efe6dd524c
commit 0b7eb103fe
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -328,7 +328,7 @@ static int rtems_flashdev_check_offset_region(
)
{
if ( ( rtems_flashdev_is_region_defined( iop ) ) &&
( offset > rtems_flashdev_get_region_size( flash, iop ) ) ) {
( offset > (int64_t) rtems_flashdev_get_region_size( flash, iop ) ) ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
return 0;
@@ -506,7 +506,7 @@ static off_t rtems_flashdev_lseek(
}
if ( ( rtems_flashdev_is_region_defined(iop) ) &&
( tmp_offset > rtems_flashdev_get_region_size( flash, iop ) ) ) {
( tmp_offset > (int64_t) rtems_flashdev_get_region_size( flash, iop ) ) ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}