mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 09:05:06 +08:00
cpukit/posix/src/mmap.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing signed and unsigned types. A common pair was size_t and int.
This commit is contained in:
committed by
Amar Takhar
parent
3c2592be04
commit
ce1d611048
@@ -286,7 +286,7 @@ void *mmap(
|
||||
*/
|
||||
r = read( fildes, mapping->addr, len );
|
||||
|
||||
if ( r != len ) {
|
||||
if ( r != (ssize_t) len ) {
|
||||
mmap_mappings_lock_release( );
|
||||
if ( !map_fixed ) {
|
||||
free( mapping->addr );
|
||||
|
||||
Reference in New Issue
Block a user