mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-04 04:31:36 +00:00
cpukit/libdl: 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:
@@ -1134,7 +1134,7 @@ rtems_rtl_obj_archive_find_obj (int fd,
|
||||
*osize = 0;
|
||||
}
|
||||
|
||||
while (*ooffset < fsize)
|
||||
while (*ooffset < (int64_t)fsize)
|
||||
{
|
||||
/*
|
||||
* Clean up any existing data.
|
||||
|
||||
@@ -115,7 +115,7 @@ rtems_rtl_obj_cache_read (rtems_rtl_obj_cache* cache,
|
||||
|
||||
if (cache->fd == fd)
|
||||
{
|
||||
if (offset >= cache->file_size)
|
||||
if (offset >= (int64_t)cache->file_size)
|
||||
{
|
||||
rtems_rtl_set_error (EINVAL, "offset past end of file: offset=%i size=%i",
|
||||
(int) offset, (int) cache->file_size);
|
||||
@@ -154,7 +154,7 @@ rtems_rtl_obj_cache_read (rtems_rtl_obj_cache* cache,
|
||||
* Is any part of the data in the cache ?
|
||||
*/
|
||||
if ((offset >= cache->offset) &&
|
||||
(offset < (cache->offset + cache->level)))
|
||||
(offset < (int64_t)(cache->offset + cache->level)))
|
||||
{
|
||||
size_t size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user