mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-11 02:11:18 +08:00
testsuites/psxtests: 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
Kinsey Moore
parent
16234ea47b
commit
e4a63b12d5
@@ -50,7 +50,7 @@
|
||||
#include <tmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void test_cat(char *file, int offset_arg, int length);
|
||||
void test_cat(char *file, int offset_arg, size_t length);
|
||||
|
||||
/*
|
||||
* test_cat routine
|
||||
@@ -59,15 +59,15 @@ void test_cat(char *file, int offset_arg, int length);
|
||||
unsigned char test_cat_buffer[ 1024 ];
|
||||
|
||||
void test_cat(
|
||||
char *file,
|
||||
int offset_arg,
|
||||
int length
|
||||
char *file,
|
||||
int offset_arg,
|
||||
size_t length
|
||||
)
|
||||
{
|
||||
int fd;
|
||||
int status;
|
||||
int is_printable = 0;
|
||||
int my_length;
|
||||
size_t my_length;
|
||||
int i;
|
||||
unsigned char c;
|
||||
int count = 0;
|
||||
|
||||
@@ -83,10 +83,10 @@ void *POSIX_Init(
|
||||
|
||||
puts( "Init - Open message queue" );
|
||||
Queue = mq_open( "Qsend", O_CREAT | O_RDWR, 0x777, &attr );
|
||||
if ( Queue == (-1) ) {
|
||||
if ( Queue == (mqd_t)(-1) ) {
|
||||
perror( "mq_open failed" );
|
||||
}
|
||||
rtems_test_assert( Queue != (-1) );
|
||||
rtems_test_assert( Queue != (mqd_t)(-1) );
|
||||
|
||||
puts( "Init - send to message queue" );
|
||||
status = mq_send( Queue, (const char *)&status, sizeof(int), 1 );
|
||||
|
||||
Reference in New Issue
Block a user