From ff7ff62a0f1598e5db1ccd76b9efac49e0959689 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 5 May 2011 16:45:52 +0000 Subject: 2011-05-05 Joel Sherrill * psx04/task3.c, psxfile01/test.c, psxhdrs/Makefile.am, psxmsgq01/init.c, psxreaddir/test.c, psxsignal01/init.c, psxtimes01/init.c, psxualarm/init.c: Remove warnings. --- testsuites/psxtests/psxreaddir/test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'testsuites/psxtests/psxreaddir/test.c') diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c index 25377fd08e..b0900cb3b7 100644 --- a/testsuites/psxtests/psxreaddir/test.c +++ b/testsuites/psxtests/psxreaddir/test.c @@ -15,7 +15,7 @@ * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1) * record where DIRENT_SIZE seems to be 12 bytes. * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -79,8 +79,10 @@ void complete_printdir( char *path ) the_dir = opendir( path ); rtems_test_assert( the_dir ); + printdir( the_dir ); status = closedir( the_dir ); + rtems_test_assert( status ); } char *many_files[] = { @@ -145,13 +147,13 @@ char *dnames[] = { "END" }; -int select1 ( struct dirent *entry ) +int select1 ( const struct dirent *entry ) { printf("SCANDIR SELECT1 accepts nodename: %s\n", entry->d_name ); return 1; } -int select2 ( struct dirent *entry ) +int select2 ( const struct dirent *entry ) { if( strcmp( entry->d_name, "y") == 0 ) { printf("SCANDIR SELECT accepted nodename: %s\n", entry->d_name ); @@ -273,6 +275,7 @@ int main( directory_not = opendir( "/many" ); printdir ( directory_not ); d_not = readdir( directory_not ); + rtems_test_assert( d_not == 0 ); printf("open /b/myfile\n"); fd = open ("/b/my_file", O_CREAT, S_IRWXU); -- cgit v1.2.3