testsuites/samples/fileio/init.c: Address -Wsign-compare warnings

Most of these warnings were between int or ssize_t and size_t.
In particular, various POSIX system calls like read() and write()
return ssize_t and comparing that value with the sizeof a buffer
is a common source of these warnings. Another common source is
using an int as the iterator in a for loop with the limit being
a size_t.

With the type change, some printf() specifiers needed to change also.
This commit is contained in:
Joel Sherrill
2026-01-22 11:02:38 -06:00
committed by Gedare Bloom
parent 3e0cf85d9c
commit f7911033b5

View File

@@ -263,7 +263,7 @@ disk_test_write_blocks (const char *name, int start, int count, size_t size)
int block;
uint32_t* ip;
uint32_t value = 0;
int i;
size_t i;
rtems_bdbuf_buffer* bd;
rtems_status_code sc;
int rv = 0;