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:
Joel Sherrill
2025-11-06 10:28:12 -06:00
committed by Kinsey Moore
parent 16234ea47b
commit e4a63b12d5
2 changed files with 7 additions and 7 deletions

View File

@@ -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
@@ -61,13 +61,13 @@ unsigned char test_cat_buffer[ 1024 ];
void test_cat(
char *file,
int offset_arg,
int length
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;

View File

@@ -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 );