From 7b64b25b1940813e7252f394d4ac2f720abc1208 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 29 May 2003 19:07:59 +0000 Subject: 2003-05-29 Joel Sherrill * psx02/init.c, psx04/init.c, psx13/test.c, psxchroot01/test.c, psxhdrs/pthread07.c, psxmsgq01/init.c, psxreaddir/test.c, psxtimer/psxtimer.c: Removed warnings. --- testsuites/psxtests/ChangeLog | 6 ++++++ testsuites/psxtests/psx02/init.c | 8 ++++---- testsuites/psxtests/psx04/init.c | 21 +++++++++++---------- testsuites/psxtests/psx13/test.c | 1 + testsuites/psxtests/psxchroot01/test.c | 3 --- testsuites/psxtests/psxhdrs/pthread07.c | 1 + testsuites/psxtests/psxmsgq01/init.c | 6 ++++-- testsuites/psxtests/psxreaddir/test.c | 4 ++-- testsuites/psxtests/psxtimer/psxtimer.c | 7 +++++-- 9 files changed, 34 insertions(+), 23 deletions(-) (limited to 'testsuites') diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index b6a05a7599..0557f57715 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,9 @@ +2003-05-29 Joel Sherrill + + * psx02/init.c, psx04/init.c, psx13/test.c, psxchroot01/test.c, + psxhdrs/pthread07.c, psxmsgq01/init.c, psxreaddir/test.c, + psxtimer/psxtimer.c: Removed warnings. + 2003-05-27 Ralf Corsepius * configure.ac: Remove CC_CFLAGS_DEBUG_V. diff --git a/testsuites/psxtests/psx02/init.c b/testsuites/psxtests/psx02/init.c index 48060fd7ae..5cbc9ed8f7 100644 --- a/testsuites/psxtests/psx02/init.c +++ b/testsuites/psxtests/psx02/init.c @@ -23,8 +23,8 @@ void Signal_handler( Signal_count++; printf( "Signal: %d caught by 0x%x (%d)\n", - signo, - pthread_self(), + (int) signo, + (unsigned int) pthread_self(), Signal_count ); Signal_occurred = 1; @@ -86,7 +86,7 @@ void *POSIX_Init( status = sigpending( &pending_set ); assert( !status ); - printf( "Init: Signals pending 0x%08x\n", pending_set ); + printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); printf( "Init: send SIGUSR1 to self\n" ); @@ -95,7 +95,7 @@ void *POSIX_Init( status = sigpending( &pending_set ); assert( !status ); - printf( "Init: Signals pending 0x%08x\n", pending_set ); + printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); printf( "Init: Unblock SIGUSR1\n" ); status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c index b6b160ef21..182b3ec8ed 100644 --- a/testsuites/psxtests/psx04/init.c +++ b/testsuites/psxtests/psx04/init.c @@ -77,19 +77,20 @@ void *POSIX_Init( status = sigemptyset( &act.sa_mask ); assert( !status ); - printf( "Init: sigemptyset - set= 0x%08x\n", act.sa_mask ); + printf( "Init: sigemptyset - set= 0x%08x\n", (unsigned int) act.sa_mask ); /* test sigfillset following the above sigemptyset */ status = sigfillset( &act.sa_mask ); assert( !status ); - printf( "Init: sigfillset - set= 0x%08x\n", act.sa_mask ); + printf( "Init: sigfillset - set= 0x%08x\n", (unsigned int) act.sa_mask ); /* test sigdelset */ status = sigdelset( &act.sa_mask, SIGUSR1 ); assert( !status ); - printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n", act.sa_mask ); + printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n", + (unsigned int) act.sa_mask ); /* test sigismember - FALSE */ @@ -166,7 +167,7 @@ void *POSIX_Init( status = sigpending( &pending_set ); assert( !status ); - printf( "Init: Signals pending 0x%08x\n", pending_set ); + printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); puts( "Init: send SIGUSR1 to process" ); status = kill( getpid(), SIGUSR1 ); @@ -174,7 +175,7 @@ void *POSIX_Init( status = sigpending( &pending_set ); assert( !status ); - printf( "Init: Signals pending 0x%08x\n", pending_set ); + printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); puts( "Init: Unblock SIGUSR1" ); status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); @@ -194,7 +195,7 @@ void *POSIX_Init( status = sigpending( &pending_set ); assert( !status ); - printf( "Init: Signals pending 0x%08x\n", pending_set ); + printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); puts( "Init: sleep so the other task can block" ); status = sleep( 1 ); @@ -208,7 +209,7 @@ void *POSIX_Init( status = sigpending( &pending_set ); assert( !status ); - printf( "Init: Signals pending 0x%08x\n", pending_set ); + printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set ); puts( "Init: sleep so the other task can catch signal" ); status = sleep( 1 ); @@ -272,13 +273,13 @@ void *POSIX_Init( puts( "Init: Block SIGUSR1 and SIGUSR2 only" ); status = pthread_sigmask( SIG_SETMASK, &mask, &oset ); - printf( "Init: Previous blocked set was 0x%08x\n", oset ); + printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset ); assert( !status ); /* test inquiry about current blocked set with pthread_sigmask */ status = pthread_sigmask( 0, NULL, &oset ); - printf( "Init: Current blocked set is 0x%08x\n", oset ); + printf( "Init: Current blocked set is 0x%08x\n", (unsigned int) oset ); assert( !status ); /* return blocked mask to no signals blocked */ @@ -288,7 +289,7 @@ void *POSIX_Init( puts( "Init: Unblock all signals" ); status = pthread_sigmask( SIG_SETMASK, &mask, &oset ); - printf( "Init: Previous blocked set was 0x%08x\n", oset ); + printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset ); assert( !status ); /* test sigsuspend */ diff --git a/testsuites/psxtests/psx13/test.c b/testsuites/psxtests/psx13/test.c index e871b11689..72e4a40aa9 100644 --- a/testsuites/psxtests/psx13/test.c +++ b/testsuites/psxtests/psx13/test.c @@ -33,6 +33,7 @@ #include #include +#include #include diff --git a/testsuites/psxtests/psxchroot01/test.c b/testsuites/psxtests/psxchroot01/test.c index 6f7ebb8e89..6716d8b4c3 100644 --- a/testsuites/psxtests/psxchroot01/test.c +++ b/testsuites/psxtests/psxchroot01/test.c @@ -66,10 +66,7 @@ int main( ) #endif { - int fd; - int i; int status; - struct stat s; /* * This test is the C equivalent of this sequence. diff --git a/testsuites/psxtests/psxhdrs/pthread07.c b/testsuites/psxtests/psxhdrs/pthread07.c index 9192820821..882cee3d11 100644 --- a/testsuites/psxtests/psxhdrs/pthread07.c +++ b/testsuites/psxtests/psxhdrs/pthread07.c @@ -24,6 +24,7 @@ void *test_task( { for ( ; ; ) ; + return NULL; } void test( void ) diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c index 56587254b4..7edae0f5cc 100644 --- a/testsuites/psxtests/psxmsgq01/init.c +++ b/testsuites/psxtests/psxmsgq01/init.c @@ -675,7 +675,9 @@ void validate_mq_receive_error_codes( ) void verify_open_functionality() { +#if 0 mqd_t n_mq; +#endif Start_Test( "mq_open functionality" ); @@ -765,7 +767,7 @@ void verify_timed_send_queue( fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT"); } - printf("Init: %d sec %d us\n", tv3.tv_sec, tv3.tv_usec ); + printf("Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec ); if ( is_blocking ) /* non-blocking queue */ assert( tv3.tv_sec == 1 ); @@ -817,7 +819,7 @@ void verify_timed_receive_queue( fatal_int_service_status( status, -1, "mq_timedreceive status"); if ( is_blocking ) fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT"); - printf( "Init: %d sec %d us\n", tv3.tv_sec, tv3.tv_usec ); + printf( "Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec ); if ( is_blocking ) assert( tv3.tv_sec == 1 ); diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c index f8615dc578..d5d6015367 100644 --- a/testsuites/psxtests/psxreaddir/test.c +++ b/testsuites/psxtests/psxreaddir/test.c @@ -156,7 +156,7 @@ int select2 ( struct dirent *entry ) return 0; } -int compare_ascending( struct dirent **a, struct dirent **b ) +int compare_ascending(const struct dirent **a, const struct dirent **b ) { int i; @@ -180,7 +180,7 @@ int compare_descending( struct dirent **a, struct dirent **b ) return i; } -int test_across_mount() +void test_across_mount() { rtems_filesystem_mount_table_entry_t *mt_entry; int status; diff --git a/testsuites/psxtests/psxtimer/psxtimer.c b/testsuites/psxtests/psxtimer/psxtimer.c index 3d6bb3eb36..5430db51ab 100644 --- a/testsuites/psxtests/psxtimer/psxtimer.c +++ b/testsuites/psxtests/psxtimer/psxtimer.c @@ -95,7 +95,8 @@ void * task_a (void *arg) clock = time(NULL); printf("Executing task A %s", ctime(&clock)); } - } + return NULL; +} /* task B */ @@ -152,6 +153,7 @@ void * task_b (void *arg) pthread_mutex_unlock (&data.mutex); x++; } + return NULL; } /* task C */ @@ -209,7 +211,8 @@ void * task_c (void *arg) printf("Executing task C with x = %i %s", x, ctime(&clock)); pthread_mutex_unlock (&data.mutex); } - } + return NULL; +} /* main */ -- cgit v1.2.3