2003-05-29 Joel Sherrill <joel@OARcorp.com>

* 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.
This commit is contained in:
Joel Sherrill
2003-05-29 19:08:53 +00:00
parent 8751d12177
commit bd2fab3ff4
9 changed files with 34 additions and 23 deletions

View File

@@ -1,3 +1,9 @@
2003-05-29 Joel Sherrill <joel@OARcorp.com>
* 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 <corsepiu@faw.uni-ulm.de> 2003-05-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Remove CC_CFLAGS_DEBUG_V. * configure.ac: Remove CC_CFLAGS_DEBUG_V.

View File

@@ -23,8 +23,8 @@ void Signal_handler(
Signal_count++; Signal_count++;
printf( printf(
"Signal: %d caught by 0x%x (%d)\n", "Signal: %d caught by 0x%x (%d)\n",
signo, (int) signo,
pthread_self(), (unsigned int) pthread_self(),
Signal_count Signal_count
); );
Signal_occurred = 1; Signal_occurred = 1;
@@ -86,7 +86,7 @@ void *POSIX_Init(
status = sigpending( &pending_set ); status = sigpending( &pending_set );
assert( !status ); 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" ); printf( "Init: send SIGUSR1 to self\n" );
@@ -95,7 +95,7 @@ void *POSIX_Init(
status = sigpending( &pending_set ); status = sigpending( &pending_set );
assert( !status ); 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" ); printf( "Init: Unblock SIGUSR1\n" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); status = sigprocmask( SIG_UNBLOCK, &mask, NULL );

View File

@@ -77,19 +77,20 @@ void *POSIX_Init(
status = sigemptyset( &act.sa_mask ); status = sigemptyset( &act.sa_mask );
assert( !status ); 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 */ /* test sigfillset following the above sigemptyset */
status = sigfillset( &act.sa_mask ); status = sigfillset( &act.sa_mask );
assert( !status ); 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 */ /* test sigdelset */
status = sigdelset( &act.sa_mask, SIGUSR1 ); status = sigdelset( &act.sa_mask, SIGUSR1 );
assert( !status ); 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 */ /* test sigismember - FALSE */
@@ -166,7 +167,7 @@ void *POSIX_Init(
status = sigpending( &pending_set ); status = sigpending( &pending_set );
assert( !status ); 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" ); puts( "Init: send SIGUSR1 to process" );
status = kill( getpid(), SIGUSR1 ); status = kill( getpid(), SIGUSR1 );
@@ -174,7 +175,7 @@ void *POSIX_Init(
status = sigpending( &pending_set ); status = sigpending( &pending_set );
assert( !status ); 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" ); puts( "Init: Unblock SIGUSR1" );
status = sigprocmask( SIG_UNBLOCK, &mask, NULL ); status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
@@ -194,7 +195,7 @@ void *POSIX_Init(
status = sigpending( &pending_set ); status = sigpending( &pending_set );
assert( !status ); 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" ); puts( "Init: sleep so the other task can block" );
status = sleep( 1 ); status = sleep( 1 );
@@ -208,7 +209,7 @@ void *POSIX_Init(
status = sigpending( &pending_set ); status = sigpending( &pending_set );
assert( !status ); 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" ); puts( "Init: sleep so the other task can catch signal" );
status = sleep( 1 ); status = sleep( 1 );
@@ -272,13 +273,13 @@ void *POSIX_Init(
puts( "Init: Block SIGUSR1 and SIGUSR2 only" ); puts( "Init: Block SIGUSR1 and SIGUSR2 only" );
status = pthread_sigmask( SIG_SETMASK, &mask, &oset ); 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 ); assert( !status );
/* test inquiry about current blocked set with pthread_sigmask */ /* test inquiry about current blocked set with pthread_sigmask */
status = pthread_sigmask( 0, NULL, &oset ); 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 ); assert( !status );
/* return blocked mask to no signals blocked */ /* return blocked mask to no signals blocked */
@@ -288,7 +289,7 @@ void *POSIX_Init(
puts( "Init: Unblock all signals" ); puts( "Init: Unblock all signals" );
status = pthread_sigmask( SIG_SETMASK, &mask, &oset ); 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 ); assert( !status );
/* test sigsuspend */ /* test sigsuspend */

View File

@@ -33,6 +33,7 @@
#include <utime.h> #include <utime.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h>
#include <pmacros.h> #include <pmacros.h>

View File

@@ -66,10 +66,7 @@ int main(
) )
#endif #endif
{ {
int fd;
int i;
int status; int status;
struct stat s;
/* /*
* This test is the C equivalent of this sequence. * This test is the C equivalent of this sequence.

View File

@@ -24,6 +24,7 @@ void *test_task(
{ {
for ( ; ; ) for ( ; ; )
; ;
return NULL;
} }
void test( void ) void test( void )

View File

@@ -675,7 +675,9 @@ void validate_mq_receive_error_codes( )
void verify_open_functionality() void verify_open_functionality()
{ {
#if 0
mqd_t n_mq; mqd_t n_mq;
#endif
Start_Test( "mq_open functionality" ); Start_Test( "mq_open functionality" );
@@ -765,7 +767,7 @@ void verify_timed_send_queue(
fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT"); 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 */ if ( is_blocking ) /* non-blocking queue */
assert( tv3.tv_sec == 1 ); assert( tv3.tv_sec == 1 );
@@ -817,7 +819,7 @@ void verify_timed_receive_queue(
fatal_int_service_status( status, -1, "mq_timedreceive status"); fatal_int_service_status( status, -1, "mq_timedreceive status");
if ( is_blocking ) if ( is_blocking )
fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT"); 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 ) if ( is_blocking )
assert( tv3.tv_sec == 1 ); assert( tv3.tv_sec == 1 );

View File

@@ -156,7 +156,7 @@ int select2 ( struct dirent *entry )
return 0; return 0;
} }
int compare_ascending( struct dirent **a, struct dirent **b ) int compare_ascending(const struct dirent **a, const struct dirent **b )
{ {
int i; int i;
@@ -180,7 +180,7 @@ int compare_descending( struct dirent **a, struct dirent **b )
return i; return i;
} }
int test_across_mount() void test_across_mount()
{ {
rtems_filesystem_mount_table_entry_t *mt_entry; rtems_filesystem_mount_table_entry_t *mt_entry;
int status; int status;

View File

@@ -95,7 +95,8 @@ void * task_a (void *arg)
clock = time(NULL); clock = time(NULL);
printf("Executing task A %s", ctime(&clock)); printf("Executing task A %s", ctime(&clock));
} }
} return NULL;
}
/* task B */ /* task B */
@@ -152,6 +153,7 @@ void * task_b (void *arg)
pthread_mutex_unlock (&data.mutex); pthread_mutex_unlock (&data.mutex);
x++; x++;
} }
return NULL;
} }
/* task C */ /* task C */
@@ -209,7 +211,8 @@ void * task_c (void *arg)
printf("Executing task C with x = %i %s", x, ctime(&clock)); printf("Executing task C with x = %i %s", x, ctime(&clock));
pthread_mutex_unlock (&data.mutex); pthread_mutex_unlock (&data.mutex);
} }
} return NULL;
}
/* main */ /* main */