From 89efbdda7c0625575e57afa10228b37519e22c20 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 2 Oct 2025 17:01:38 -0500 Subject: [PATCH] testsuites/fstests/*: Address unused parameter warnings Add "(void) param;" annotation to address unused parameter warnings. Found with GCC's warning -Wunused-paramter. --- testsuites/fstests/fsbdpart01/init.c | 2 ++ testsuites/fstests/fsclose01/init.c | 36 +++++++++++++++++++ testsuites/fstests/fsdosfsformat01/init.c | 2 ++ testsuites/fstests/fsdosfsname01/init.c | 5 +++ testsuites/fstests/fsdosfsname02/init.c | 2 ++ testsuites/fstests/fsdosfssync01/init.c | 2 ++ testsuites/fstests/fsdosfswrite01/init.c | 2 ++ testsuites/fstests/fsfseeko01/init.c | 2 ++ testsuites/fstests/fsimfsconfig01/init.c | 2 ++ testsuites/fstests/fsimfsconfig02/init.c | 2 ++ testsuites/fstests/fsimfsconfig03/init.c | 2 ++ testsuites/fstests/fsimfsgeneric01/init.c | 35 ++++++++++++++++++ testsuites/fstests/fsjffs2empty01/init.c | 2 ++ testsuites/fstests/fsnofs01/init.c | 2 ++ testsuites/fstests/fsrofs01/init.c | 2 ++ .../fstests/jffs2_nand_support/fs_support.c | 8 +++++ testsuites/fstests/tftpfs/init.c | 6 ++++ .../fstests/tftpfs/tftpfs_udp_network_fake.c | 2 ++ 18 files changed, 116 insertions(+) diff --git a/testsuites/fstests/fsbdpart01/init.c b/testsuites/fstests/fsbdpart01/init.c index 634604f9ca..a8af335d7f 100644 --- a/testsuites/fstests/fsbdpart01/init.c +++ b/testsuites/fstests/fsbdpart01/init.c @@ -221,6 +221,8 @@ static void test_ide_part_table(void) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test_bdpart(); diff --git a/testsuites/fstests/fsclose01/init.c b/testsuites/fstests/fsclose01/init.c index e80d2a8c33..bdb3d279db 100644 --- a/testsuites/fstests/fsclose01/init.c +++ b/testsuites/fstests/fsclose01/init.c @@ -121,6 +121,10 @@ static int handler_open( mode_t mode ) { + (void) path; + (void) oflag; + (void) mode; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -156,6 +160,9 @@ static ssize_t handler_read( size_t count ) { + (void) buffer; + (void) count; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -171,6 +178,9 @@ static ssize_t handler_write( size_t count ) { + (void) buffer; + (void) count; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -186,6 +196,9 @@ static int handler_ioctl( void *buffer ) { + (void) request; + (void) buffer; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -201,6 +214,9 @@ static off_t handler_lseek( int whence ) { + (void) length; + (void) whence; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -234,6 +250,8 @@ static int handler_ftruncate( off_t length ) { + (void) length; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -274,6 +292,8 @@ static int handler_fcntl( int cmd ) { + (void) cmd; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -290,6 +310,10 @@ static ssize_t handler_readv( ssize_t total ) { + (void) iov; + (void) iovcnt; + (void) total; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -306,6 +330,10 @@ static ssize_t handler_writev( ssize_t total ) { + (void) iov; + (void) iovcnt; + (void) total; + test_context *ctx; ctx = IMFS_generic_get_context_by_iop(iop); @@ -340,6 +368,8 @@ static const IMFS_node_control node_control = { static void worker_task(rtems_task_argument arg) { + (void) arg; + test_context *ctx; int rv; char buf[1]; @@ -577,6 +607,8 @@ static void test_close(test_context *ctx) } static void test_iop(test_context *ctx) { + (void) ctx; + const size_t iops_free = free_iops(); rtems_libio_t *iop; rtems_libio_t *iop2; @@ -638,6 +670,8 @@ static void test_iop(test_context *ctx) { static void test_tmpfile(test_context *ctx) { + (void) ctx; + rtems_resource_snapshot before; FILE *f; int rv; @@ -660,6 +694,8 @@ static void test_tmpfile(test_context *ctx) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test_iop(&test_instance); test_close(&test_instance); diff --git a/testsuites/fstests/fsdosfsformat01/init.c b/testsuites/fstests/fsdosfsformat01/init.c index 876d9c2f58..1c3a811c3d 100644 --- a/testsuites/fstests/fsdosfsformat01/init.c +++ b/testsuites/fstests/fsdosfsformat01/init.c @@ -511,6 +511,8 @@ static void test( void ) static void Init( rtems_task_argument arg ) { + (void) arg; + TEST_BEGIN(); test(); diff --git a/testsuites/fstests/fsdosfsname01/init.c b/testsuites/fstests/fsdosfsname01/init.c index 16fe6e9f84..48ae68ed6a 100644 --- a/testsuites/fstests/fsdosfsname01/init.c +++ b/testsuites/fstests/fsdosfsname01/init.c @@ -853,6 +853,9 @@ static void print_image( const char* image_name ) { + (void) include_guard; + (void) image_name; + /* Nothing to be done */ } #endif /* PRINT_DISK_IMAGE */ @@ -1430,6 +1433,8 @@ static void test( void ) static void Init( rtems_task_argument arg ) { + (void) arg; + TEST_BEGIN(); test(); diff --git a/testsuites/fstests/fsdosfsname02/init.c b/testsuites/fstests/fsdosfsname02/init.c index 3ff878c997..2d398e4a71 100644 --- a/testsuites/fstests/fsdosfsname02/init.c +++ b/testsuites/fstests/fsdosfsname02/init.c @@ -91,6 +91,8 @@ static void test(void) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test(); diff --git a/testsuites/fstests/fsdosfssync01/init.c b/testsuites/fstests/fsdosfssync01/init.c index b4e8c08a7e..8bea1d2ca0 100644 --- a/testsuites/fstests/fsdosfssync01/init.c +++ b/testsuites/fstests/fsdosfssync01/init.c @@ -150,6 +150,8 @@ static void test(const char *rda, const char *mnt, const char *file) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test("/dev/rda", "/mnt", "/mnt/file"); diff --git a/testsuites/fstests/fsdosfswrite01/init.c b/testsuites/fstests/fsdosfswrite01/init.c index 15928cbcf0..ef96c651a0 100644 --- a/testsuites/fstests/fsdosfswrite01/init.c +++ b/testsuites/fstests/fsdosfswrite01/init.c @@ -290,6 +290,8 @@ static void test( void ) static void Init( rtems_task_argument arg ) { + (void) arg; + TEST_BEGIN(); test(); diff --git a/testsuites/fstests/fsfseeko01/init.c b/testsuites/fstests/fsfseeko01/init.c index 01bf024d95..a5a03c2654 100644 --- a/testsuites/fstests/fsfseeko01/init.c +++ b/testsuites/fstests/fsfseeko01/init.c @@ -100,6 +100,8 @@ static void test(void) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test(); diff --git a/testsuites/fstests/fsimfsconfig01/init.c b/testsuites/fstests/fsimfsconfig01/init.c index bd994c895c..43e9fa5f00 100644 --- a/testsuites/fstests/fsimfsconfig01/init.c +++ b/testsuites/fstests/fsimfsconfig01/init.c @@ -52,6 +52,8 @@ static const IMFS_node_control node_control = IMFS_GENERIC_INITIALIZER( static void Init(rtems_task_argument arg) { + (void) arg; + const struct utimbuf times = {0}; const char *generic = "generic"; const char *mnt = "mnt"; diff --git a/testsuites/fstests/fsimfsconfig02/init.c b/testsuites/fstests/fsimfsconfig02/init.c index 87f226f8dc..42e793f4e0 100644 --- a/testsuites/fstests/fsimfsconfig02/init.c +++ b/testsuites/fstests/fsimfsconfig02/init.c @@ -42,6 +42,8 @@ const char rtems_test_name[] = "FSIMFSCONFIG 2"; static void Init(rtems_task_argument arg) { + (void) arg; + const char *mnt = "mnt"; const char *link = "link"; char buf[1]; diff --git a/testsuites/fstests/fsimfsconfig03/init.c b/testsuites/fstests/fsimfsconfig03/init.c index 2fe37f3b6e..5b754e3c64 100644 --- a/testsuites/fstests/fsimfsconfig03/init.c +++ b/testsuites/fstests/fsimfsconfig03/init.c @@ -51,6 +51,8 @@ static const IMFS_node_control node_control = IMFS_GENERIC_INITIALIZER( static void Init(rtems_task_argument arg) { + (void) arg; + const struct utimbuf times = {0}; const char *generic = "generic"; const char *mnt = "mnt"; diff --git a/testsuites/fstests/fsimfsgeneric01/init.c b/testsuites/fstests/fsimfsgeneric01/init.c index 3a3bbc60d8..20587f0178 100644 --- a/testsuites/fstests/fsimfsgeneric01/init.c +++ b/testsuites/fstests/fsimfsgeneric01/init.c @@ -73,6 +73,10 @@ static int handler_open( mode_t mode ) { + (void) path; + (void) oflag; + (void) mode; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_FSTAT_OPEN_1); @@ -99,6 +103,9 @@ static ssize_t handler_read( size_t count ) { + (void) buffer; + (void) count; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_OPEN); @@ -113,6 +120,9 @@ static ssize_t handler_write( size_t count ) { + (void) buffer; + (void) count; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_READ); @@ -127,6 +137,9 @@ static int handler_ioctl( void *buffer ) { + (void) request; + (void) buffer; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_WRITE); @@ -141,6 +154,9 @@ static off_t handler_lseek( int whence ) { + (void) length; + (void) whence; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_IOCTL); @@ -181,6 +197,8 @@ static int handler_ftruncate( off_t length ) { + (void) length; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_LSEEK); @@ -218,6 +236,8 @@ static int handler_fcntl( int cmd ) { + (void) cmd; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_FDATASYNC); @@ -233,6 +253,10 @@ static ssize_t handler_readv( ssize_t total ) { + (void) iov; + (void) iovcnt; + (void) total; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_FCNTL); @@ -248,6 +272,10 @@ static ssize_t handler_writev( ssize_t total ) { + (void) iov; + (void) iovcnt; + (void) total; + test_state *state = IMFS_generic_get_context_by_iop(iop); rtems_test_assert(*state == TEST_READV); @@ -391,6 +419,9 @@ static IMFS_jnode_t *node_initialize_error( void *arg ) { + (void) node; + (void) arg; + errno = EIO; return NULL; @@ -405,6 +436,8 @@ static IMFS_jnode_t *node_remove_inhibited(IMFS_jnode_t *node) static void node_destroy_inhibited(IMFS_jnode_t *node) { + (void) node; + rtems_test_assert(false); } @@ -633,6 +666,8 @@ static void test_imfs_add_node_errors(void) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test_imfs_make_generic_node(); diff --git a/testsuites/fstests/fsjffs2empty01/init.c b/testsuites/fstests/fsjffs2empty01/init.c index 3232ea8fde..573539c1d2 100644 --- a/testsuites/fstests/fsjffs2empty01/init.c +++ b/testsuites/fstests/fsjffs2empty01/init.c @@ -179,6 +179,8 @@ static void test_shutdown_filesystem(void) static rtems_task Init( rtems_task_argument ignored) { + (void) ignored; + int rv; TEST_BEGIN(); diff --git a/testsuites/fstests/fsnofs01/init.c b/testsuites/fstests/fsnofs01/init.c index b1c1488168..9d0d4ee4fd 100644 --- a/testsuites/fstests/fsnofs01/init.c +++ b/testsuites/fstests/fsnofs01/init.c @@ -510,6 +510,8 @@ static void test_check_access(void) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test_initial_values(); diff --git a/testsuites/fstests/fsrofs01/init.c b/testsuites/fstests/fsrofs01/init.c index 0af88879d9..e83658a6fb 100644 --- a/testsuites/fstests/fsrofs01/init.c +++ b/testsuites/fstests/fsrofs01/init.c @@ -166,6 +166,8 @@ static void test_rofs(void) static void Init(rtems_task_argument arg) { + (void) arg; + TEST_BEGIN(); test_create_file_system(); diff --git a/testsuites/fstests/jffs2_nand_support/fs_support.c b/testsuites/fstests/jffs2_nand_support/fs_support.c index 9e7c965735..15c7594e62 100644 --- a/testsuites/fstests/jffs2_nand_support/fs_support.c +++ b/testsuites/fstests/jffs2_nand_support/fs_support.c @@ -156,6 +156,9 @@ static int flash_block_is_bad( bool *bad ) { + (void) super; + (void) orig_offset; + *bad = false; return 0; } @@ -165,6 +168,9 @@ static int flash_block_mark_bad( uint32_t orig_offset ) { + (void) super; + (void) orig_offset; + return 0; } @@ -172,6 +178,8 @@ static uint32_t flash_get_oob_size( rtems_jffs2_flash_control *super ) { + (void) super; + return FLASH_PAGE_OOB_SIZE; } diff --git a/testsuites/fstests/tftpfs/init.c b/testsuites/fstests/tftpfs/init.c index 3cf9112e2a..0acc69d38c 100644 --- a/testsuites/fstests/tftpfs/init.c +++ b/testsuites/fstests/tftpfs/init.c @@ -206,6 +206,8 @@ static const T_fixture fixture_small_opt_size = { static void setup_mount_point( void *context ) { + (void) context; + int result; _Tftp_Reset(); @@ -215,6 +217,8 @@ static void setup_mount_point( void *context ) static void teardown_mount_point( void *context ) { + (void) context; + int result; result = rmdir( tftpfs_mount_point ); @@ -6900,6 +6904,8 @@ const char rtems_test_name[] = "TFTPFS"; static void Init( rtems_task_argument argument ) { + (void) argument; + rtems_test_run( argument, TEST_STATE ); } diff --git a/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c b/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c index 995ae05fe0..82e918b316 100644 --- a/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c +++ b/testsuites/fstests/tftpfs/tftpfs_udp_network_fake.c @@ -578,6 +578,8 @@ static uint16_t get_ip_addr_as_str( size_t buf_size ) { + (void) addrlen; + uint16_t port = 0xFFFF; *buf = '\0';