From f7911033b56e8a7294221b0131334b09c7f25ebe Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 22 Jan 2026 11:02:38 -0600 Subject: [PATCH] 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. --- testsuites/samples/fileio/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c index c16afee95c..2829237393 100644 --- a/testsuites/samples/fileio/init.c +++ b/testsuites/samples/fileio/init.c @@ -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;