diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-05-12 11:01:26 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-05-31 10:06:16 -0500 |
commit | 3c8eda77b91589f2829765666c5daad3a582537b (patch) | |
tree | 3f36bfee4b90f119c52293a79680bb0df05b10b6 /testsuites/sptests/spmountmgr01 | |
parent | Revert "Revert "libtests/complex: Avoid generated files"" (diff) | |
download | rtems-3c8eda77b91589f2829765666c5daad3a582537b.tar.bz2 |
sptests - Eliminate missing prototype warnings
Diffstat (limited to 'testsuites/sptests/spmountmgr01')
-rw-r--r-- | testsuites/sptests/spmountmgr01/init.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/testsuites/sptests/spmountmgr01/init.c b/testsuites/sptests/spmountmgr01/init.c index ba0fdbd1ce..01308a58a3 100644 --- a/testsuites/sptests/spmountmgr01/init.c +++ b/testsuites/sptests/spmountmgr01/init.c @@ -17,8 +17,17 @@ #include <rtems/libio_.h> #include <rtems/libcsupport.h> -int fs_mount( rtems_filesystem_mount_table_entry_t *mt_entry, - const void *data ) +/* forward declarations to avoid warnings */ +rtems_task Init(rtems_task_argument argument); +int fs_mount( + rtems_filesystem_mount_table_entry_t *mt_entry, + const void *data +); + +int fs_mount( + rtems_filesystem_mount_table_entry_t *mt_entry, + const void *data +) { return 0; } @@ -29,7 +38,7 @@ rtems_task Init( { int status = 0; void *alloc_ptr = (void *)0; - + puts( "\n\n*** TEST MOUNT MANAGER ROUTINE - 01 ***" ); puts( "Init - allocating most of heap -- OK" ); @@ -50,25 +59,24 @@ rtems_task Init( puts( "Init - attempt to make target(NULL) and mount - expect EINVAL" ); status = mount_and_make_target_path( - NULL, - NULL, - "fs", - 0, - NULL ); + NULL, + NULL, + "fs", + 0, + NULL ); rtems_test_assert( status == -1 ); rtems_test_assert( errno == EINVAL ); puts( "Init - attempt to make target and mount - expect EINVAL" ); status = mount_and_make_target_path( - NULL, - "/tmp", - "fs", - 2, - NULL ); + NULL, + "/tmp", + "fs", + 2, + NULL ); rtems_test_assert( status == -1 ); rtems_test_assert( errno == EINVAL ); - puts( "Init - register filesystem fs - expect EINVAL" ); status = rtems_filesystem_register( "fs", fs_mount ); rtems_test_assert( status == -1 ); @@ -82,7 +90,7 @@ rtems_task Init( status = rtems_filesystem_register( "bfs", fs_mount ); rtems_test_assert( status == -1 ); rtems_test_assert( errno == EINVAL ); - + puts( "Init - attempt to unregister with bad args - expect EINVAL" ); status = rtems_filesystem_unregister( NULL ); rtems_test_assert( status == -1 ); @@ -91,7 +99,7 @@ rtems_task Init( puts( "Init - attempt to unregister fs -- OK" ); status = rtems_filesystem_unregister( "fs" ); rtems_test_assert( status == 0 ); - + puts( "Init - attempt to unregister fs again - expect ENOENT" ); status = rtems_filesystem_unregister( "fs" ); rtems_test_assert( status == -1 ); @@ -100,7 +108,7 @@ rtems_task Init( puts( "Init - attempt to unregister bfs -- OK" ); status = rtems_filesystem_unregister( "bfs" ); rtems_test_assert( status == 0 ); - + puts( "Init - attempt to unregister bfs again - expect ENOENT" ); status = rtems_filesystem_unregister( "bfs" ); rtems_test_assert( status == -1 ); |