testsuites/psxtests: Fix unused parameter warnings in Init

Silences -Werror=unused-parameter warnings in psximfs and psximfs04
tests by explicitly casting the unused argument to void. This fixes
the build on strict compilers.
This commit is contained in:
Karthikey Kadati
2025-12-18 18:26:22 +05:30
committed by Joel Sherrill
parent 919bdceecc
commit d88a475194
2 changed files with 28 additions and 28 deletions

View File

@@ -222,38 +222,36 @@ void unlink_it(void)
rtems_test_assert( rc == 0 );
}
void statvfs_helper(void)
void statvfs_helper( void )
{
struct statvfs imfs_statvfs;
puts( "statvfs(" FILE_NAME ") - OK " );
int rc = statvfs(FILE_NAME, &imfs_statvfs);
rtems_test_assert(rc == 0);
//rtems_test_assert(imfs_statvfs.f_bsize == BLOCK_SIZE);
rtems_test_assert(imfs_statvfs.f_files == 2);
int rc = statvfs( FILE_NAME, &imfs_statvfs );
rtems_test_assert( rc == 0 );
// rtems_test_assert(imfs_statvfs.f_bsize == BLOCK_SIZE);
rtems_test_assert( imfs_statvfs.f_files == 2 );
}
rtems_task Init(
rtems_task_argument argument
)
rtems_task Init( rtems_task_argument argument )
{
int i;
void *alloc_ptr = (void *)0;
off_t position;
off_t new_position;
char buf [1];
int i;
void *alloc_ptr = (void *) 0;
off_t position;
off_t new_position;
char buf[ 1 ];
ssize_t n;
(void) argument;
TEST_BEGIN();
if (init_memory)
{
if ( init_memory ) {
init_memory();
}
for (i=0 ; i<sizeof(Buffer) ; i++ )
Buffer[i] = (uint8_t) i;
for ( i = 0; i < sizeof( Buffer ); i++ ) Buffer[ i ] = (uint8_t) i;
open_it(false, true);
open_it( false, true );
statvfs_helper();

View File

@@ -50,27 +50,29 @@ rtems_task Init(rtems_task_argument argument)
{
int TestFd, rv;
(void) argument;
TEST_BEGIN();
puts( "open(" FILE_NAME ") - OK ");
puts( "open(" FILE_NAME ") - OK " );
TestFd = open( FILE_NAME, O_CREAT | O_RDWR, 0777 );
rtems_test_assert(TestFd != -1);
rtems_test_assert( TestFd != -1 );
puts( "close(" FILE_NAME ") - OK ");
rv = close(TestFd);
rtems_test_assert(rv == 0);
puts( "close(" FILE_NAME ") - OK " );
rv = close( TestFd );
rtems_test_assert( rv == 0 );
struct statvfs imfs_statvfs;
puts( "statvfs(" FILE_NAME ") - OK ");
rv = statvfs(FILE_NAME, &imfs_statvfs);
rtems_test_assert(imfs_statvfs.f_bsize == BLOCK_SIZE);
puts( "statvfs(" FILE_NAME ") - OK " );
rv = statvfs( FILE_NAME, &imfs_statvfs );
rtems_test_assert( imfs_statvfs.f_bsize == BLOCK_SIZE );
rv = unlink( FILE_NAME );
rtems_test_assert(rv == 0);
rtems_test_assert( rv == 0 );
TEST_END();
rtems_test_exit(0);
rtems_test_exit( 0 );
}
/* configuration information */