testsuites/fstests/*: Address unused parameter warnings

Add "(void) param;" annotation to address unused parameter warnings.
    Found with GCC's warning -Wunused-paramter.
This commit is contained in:
Joel Sherrill
2025-10-02 17:01:38 -05:00
committed by Gedare Bloom
parent 6fc0e50f6c
commit 89efbdda7c
18 changed files with 116 additions and 0 deletions

View File

@@ -221,6 +221,8 @@ static void test_ide_part_table(void)
static void Init(rtems_task_argument arg)
{
(void) arg;
TEST_BEGIN();
test_bdpart();

View File

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

View File

@@ -511,6 +511,8 @@ static void test( void )
static void Init( rtems_task_argument arg )
{
(void) arg;
TEST_BEGIN();
test();

View File

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

View File

@@ -91,6 +91,8 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
(void) arg;
TEST_BEGIN();
test();

View File

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

View File

@@ -290,6 +290,8 @@ static void test( void )
static void Init( rtems_task_argument arg )
{
(void) arg;
TEST_BEGIN();
test();

View File

@@ -100,6 +100,8 @@ static void test(void)
static void Init(rtems_task_argument arg)
{
(void) arg;
TEST_BEGIN();
test();

View File

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

View File

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

View File

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

View File

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

View File

@@ -179,6 +179,8 @@ static void test_shutdown_filesystem(void)
static rtems_task Init(
rtems_task_argument ignored)
{
(void) ignored;
int rv;
TEST_BEGIN();

View File

@@ -510,6 +510,8 @@ static void test_check_access(void)
static void Init(rtems_task_argument arg)
{
(void) arg;
TEST_BEGIN();
test_initial_values();

View File

@@ -166,6 +166,8 @@ static void test_rofs(void)
static void Init(rtems_task_argument arg)
{
(void) arg;
TEST_BEGIN();
test_create_file_system();

View File

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

View File

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

View File

@@ -578,6 +578,8 @@ static uint16_t get_ip_addr_as_str(
size_t buf_size
)
{
(void) addrlen;
uint16_t port = 0xFFFF;
*buf = '\0';