mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-12 19:06:28 +08:00
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:
committed by
Gedare Bloom
parent
6fc0e50f6c
commit
89efbdda7c
@@ -221,6 +221,8 @@ static void test_ide_part_table(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test_bdpart();
|
test_bdpart();
|
||||||
|
|||||||
@@ -121,6 +121,10 @@ static int handler_open(
|
|||||||
mode_t mode
|
mode_t mode
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) path;
|
||||||
|
(void) oflag;
|
||||||
|
(void) mode;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -156,6 +160,9 @@ static ssize_t handler_read(
|
|||||||
size_t count
|
size_t count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) buffer;
|
||||||
|
(void) count;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -171,6 +178,9 @@ static ssize_t handler_write(
|
|||||||
size_t count
|
size_t count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) buffer;
|
||||||
|
(void) count;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -186,6 +196,9 @@ static int handler_ioctl(
|
|||||||
void *buffer
|
void *buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) request;
|
||||||
|
(void) buffer;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -201,6 +214,9 @@ static off_t handler_lseek(
|
|||||||
int whence
|
int whence
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) length;
|
||||||
|
(void) whence;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -234,6 +250,8 @@ static int handler_ftruncate(
|
|||||||
off_t length
|
off_t length
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) length;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -274,6 +292,8 @@ static int handler_fcntl(
|
|||||||
int cmd
|
int cmd
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) cmd;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -290,6 +310,10 @@ static ssize_t handler_readv(
|
|||||||
ssize_t total
|
ssize_t total
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) iov;
|
||||||
|
(void) iovcnt;
|
||||||
|
(void) total;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
ctx = IMFS_generic_get_context_by_iop(iop);
|
||||||
@@ -306,6 +330,10 @@ static ssize_t handler_writev(
|
|||||||
ssize_t total
|
ssize_t total
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) iov;
|
||||||
|
(void) iovcnt;
|
||||||
|
(void) total;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
|
|
||||||
ctx = IMFS_generic_get_context_by_iop(iop);
|
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)
|
static void worker_task(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
test_context *ctx;
|
test_context *ctx;
|
||||||
int rv;
|
int rv;
|
||||||
char buf[1];
|
char buf[1];
|
||||||
@@ -577,6 +607,8 @@ static void test_close(test_context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void test_iop(test_context *ctx) {
|
static void test_iop(test_context *ctx) {
|
||||||
|
(void) ctx;
|
||||||
|
|
||||||
const size_t iops_free = free_iops();
|
const size_t iops_free = free_iops();
|
||||||
rtems_libio_t *iop;
|
rtems_libio_t *iop;
|
||||||
rtems_libio_t *iop2;
|
rtems_libio_t *iop2;
|
||||||
@@ -638,6 +670,8 @@ static void test_iop(test_context *ctx) {
|
|||||||
|
|
||||||
static void test_tmpfile(test_context *ctx)
|
static void test_tmpfile(test_context *ctx)
|
||||||
{
|
{
|
||||||
|
(void) ctx;
|
||||||
|
|
||||||
rtems_resource_snapshot before;
|
rtems_resource_snapshot before;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int rv;
|
int rv;
|
||||||
@@ -660,6 +694,8 @@ static void test_tmpfile(test_context *ctx)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
test_iop(&test_instance);
|
test_iop(&test_instance);
|
||||||
test_close(&test_instance);
|
test_close(&test_instance);
|
||||||
|
|||||||
@@ -511,6 +511,8 @@ static void test( void )
|
|||||||
|
|
||||||
static void Init( rtems_task_argument arg )
|
static void Init( rtems_task_argument arg )
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -853,6 +853,9 @@ static void print_image(
|
|||||||
const char* image_name
|
const char* image_name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) include_guard;
|
||||||
|
(void) image_name;
|
||||||
|
|
||||||
/* Nothing to be done */
|
/* Nothing to be done */
|
||||||
}
|
}
|
||||||
#endif /* PRINT_DISK_IMAGE */
|
#endif /* PRINT_DISK_IMAGE */
|
||||||
@@ -1430,6 +1433,8 @@ static void test( void )
|
|||||||
|
|
||||||
static void Init( rtems_task_argument arg )
|
static void Init( rtems_task_argument arg )
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ static void test(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -150,6 +150,8 @@ static void test(const char *rda, const char *mnt, const char *file)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test("/dev/rda", "/mnt", "/mnt/file");
|
test("/dev/rda", "/mnt", "/mnt/file");
|
||||||
|
|||||||
@@ -290,6 +290,8 @@ static void test( void )
|
|||||||
|
|
||||||
static void Init( rtems_task_argument arg )
|
static void Init( rtems_task_argument arg )
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -100,6 +100,8 @@ static void test(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test();
|
test();
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ static const IMFS_node_control node_control = IMFS_GENERIC_INITIALIZER(
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
const struct utimbuf times = {0};
|
const struct utimbuf times = {0};
|
||||||
const char *generic = "generic";
|
const char *generic = "generic";
|
||||||
const char *mnt = "mnt";
|
const char *mnt = "mnt";
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ const char rtems_test_name[] = "FSIMFSCONFIG 2";
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
const char *mnt = "mnt";
|
const char *mnt = "mnt";
|
||||||
const char *link = "link";
|
const char *link = "link";
|
||||||
char buf[1];
|
char buf[1];
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ static const IMFS_node_control node_control = IMFS_GENERIC_INITIALIZER(
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
const struct utimbuf times = {0};
|
const struct utimbuf times = {0};
|
||||||
const char *generic = "generic";
|
const char *generic = "generic";
|
||||||
const char *mnt = "mnt";
|
const char *mnt = "mnt";
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ static int handler_open(
|
|||||||
mode_t mode
|
mode_t mode
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) path;
|
||||||
|
(void) oflag;
|
||||||
|
(void) mode;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_FSTAT_OPEN_1);
|
rtems_test_assert(*state == TEST_FSTAT_OPEN_1);
|
||||||
@@ -99,6 +103,9 @@ static ssize_t handler_read(
|
|||||||
size_t count
|
size_t count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) buffer;
|
||||||
|
(void) count;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_OPEN);
|
rtems_test_assert(*state == TEST_OPEN);
|
||||||
@@ -113,6 +120,9 @@ static ssize_t handler_write(
|
|||||||
size_t count
|
size_t count
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) buffer;
|
||||||
|
(void) count;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_READ);
|
rtems_test_assert(*state == TEST_READ);
|
||||||
@@ -127,6 +137,9 @@ static int handler_ioctl(
|
|||||||
void *buffer
|
void *buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) request;
|
||||||
|
(void) buffer;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_WRITE);
|
rtems_test_assert(*state == TEST_WRITE);
|
||||||
@@ -141,6 +154,9 @@ static off_t handler_lseek(
|
|||||||
int whence
|
int whence
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) length;
|
||||||
|
(void) whence;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_IOCTL);
|
rtems_test_assert(*state == TEST_IOCTL);
|
||||||
@@ -181,6 +197,8 @@ static int handler_ftruncate(
|
|||||||
off_t length
|
off_t length
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) length;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_LSEEK);
|
rtems_test_assert(*state == TEST_LSEEK);
|
||||||
@@ -218,6 +236,8 @@ static int handler_fcntl(
|
|||||||
int cmd
|
int cmd
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) cmd;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_FDATASYNC);
|
rtems_test_assert(*state == TEST_FDATASYNC);
|
||||||
@@ -233,6 +253,10 @@ static ssize_t handler_readv(
|
|||||||
ssize_t total
|
ssize_t total
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) iov;
|
||||||
|
(void) iovcnt;
|
||||||
|
(void) total;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_FCNTL);
|
rtems_test_assert(*state == TEST_FCNTL);
|
||||||
@@ -248,6 +272,10 @@ static ssize_t handler_writev(
|
|||||||
ssize_t total
|
ssize_t total
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) iov;
|
||||||
|
(void) iovcnt;
|
||||||
|
(void) total;
|
||||||
|
|
||||||
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
test_state *state = IMFS_generic_get_context_by_iop(iop);
|
||||||
|
|
||||||
rtems_test_assert(*state == TEST_READV);
|
rtems_test_assert(*state == TEST_READV);
|
||||||
@@ -391,6 +419,9 @@ static IMFS_jnode_t *node_initialize_error(
|
|||||||
void *arg
|
void *arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) node;
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
|
|
||||||
return NULL;
|
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)
|
static void node_destroy_inhibited(IMFS_jnode_t *node)
|
||||||
{
|
{
|
||||||
|
(void) node;
|
||||||
|
|
||||||
rtems_test_assert(false);
|
rtems_test_assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -633,6 +666,8 @@ static void test_imfs_add_node_errors(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test_imfs_make_generic_node();
|
test_imfs_make_generic_node();
|
||||||
|
|||||||
@@ -179,6 +179,8 @@ static void test_shutdown_filesystem(void)
|
|||||||
static rtems_task Init(
|
static rtems_task Init(
|
||||||
rtems_task_argument ignored)
|
rtems_task_argument ignored)
|
||||||
{
|
{
|
||||||
|
(void) ignored;
|
||||||
|
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|||||||
@@ -510,6 +510,8 @@ static void test_check_access(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test_initial_values();
|
test_initial_values();
|
||||||
|
|||||||
@@ -166,6 +166,8 @@ static void test_rofs(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|
||||||
test_create_file_system();
|
test_create_file_system();
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ static int flash_block_is_bad(
|
|||||||
bool *bad
|
bool *bad
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) super;
|
||||||
|
(void) orig_offset;
|
||||||
|
|
||||||
*bad = false;
|
*bad = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -165,6 +168,9 @@ static int flash_block_mark_bad(
|
|||||||
uint32_t orig_offset
|
uint32_t orig_offset
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) super;
|
||||||
|
(void) orig_offset;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,6 +178,8 @@ static uint32_t flash_get_oob_size(
|
|||||||
rtems_jffs2_flash_control *super
|
rtems_jffs2_flash_control *super
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) super;
|
||||||
|
|
||||||
return FLASH_PAGE_OOB_SIZE;
|
return FLASH_PAGE_OOB_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -206,6 +206,8 @@ static const T_fixture fixture_small_opt_size = {
|
|||||||
|
|
||||||
static void setup_mount_point( void *context )
|
static void setup_mount_point( void *context )
|
||||||
{
|
{
|
||||||
|
(void) context;
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
_Tftp_Reset();
|
_Tftp_Reset();
|
||||||
@@ -215,6 +217,8 @@ static void setup_mount_point( void *context )
|
|||||||
|
|
||||||
static void teardown_mount_point( void *context )
|
static void teardown_mount_point( void *context )
|
||||||
{
|
{
|
||||||
|
(void) context;
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = rmdir( tftpfs_mount_point );
|
result = rmdir( tftpfs_mount_point );
|
||||||
@@ -6900,6 +6904,8 @@ const char rtems_test_name[] = "TFTPFS";
|
|||||||
|
|
||||||
static void Init( rtems_task_argument argument )
|
static void Init( rtems_task_argument argument )
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_test_run( argument, TEST_STATE );
|
rtems_test_run( argument, TEST_STATE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -578,6 +578,8 @@ static uint16_t get_ip_addr_as_str(
|
|||||||
size_t buf_size
|
size_t buf_size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) addrlen;
|
||||||
|
|
||||||
uint16_t port = 0xFFFF;
|
uint16_t port = 0xFFFF;
|
||||||
*buf = '\0';
|
*buf = '\0';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user