Remove unused vars.

Add missing prototypes.
This commit is contained in:
Ralf Corsepius
2009-10-25 06:25:04 +00:00
parent 147e4ac52b
commit b6912c40f8
22 changed files with 28 additions and 78 deletions

View File

@@ -18,12 +18,10 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
struct timespec tv;
struct timespec tr; struct timespec tr;
int status; int status;
int priority; int priority;
pthread_t thread_id; pthread_t thread_id;
struct tm tm;
struct utsname uts; struct utsname uts;
puts( "\n\n*** POSIX TEST 1 ***" ); puts( "\n\n*** POSIX TEST 1 ***" );

View File

@@ -64,10 +64,6 @@ void *POSIX_Init(
int sc; int sc;
struct sigaction act; struct sigaction act;
sigset_t mask; sigset_t mask;
sigset_t pending_set;
sigset_t oset;
struct timespec timeout;
siginfo_t info;
puts( "\n\n*** POSIX ALARM TEST 01 ***" ); puts( "\n\n*** POSIX ALARM TEST 01 ***" );

View File

@@ -52,13 +52,11 @@ int main(
) )
#endif #endif
{ {
pthread_barrier_t another_barrier;
pthread_barrier_t bad_barrier = 100; pthread_barrier_t bad_barrier = 100;
pthread_barrier_t barrier; pthread_barrier_t barrier;
pthread_barrierattr_t attr; pthread_barrierattr_t attr;
int status; int status;
int p; int p;
pthread_t thread_id;
int i; int i;
puts( "\n\n*** POSIX BARRIER TEST 01 ***" ); puts( "\n\n*** POSIX BARRIER TEST 01 ***" );

View File

@@ -30,8 +30,6 @@ rtems_task Init(
struct timespec tv; struct timespec tv;
struct timespec tr; struct timespec tr;
int sc; int sc;
int priority;
pthread_t thread_id;
time_t seconds; time_t seconds;
time_t seconds1; time_t seconds1;
unsigned int remaining; unsigned int remaining;

View File

@@ -30,7 +30,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR EFAULT #define FATAL_ERROR_EXPECTED_ERROR EFAULT
void force_error() void force_error(void)
{ {
/* we will not run this far */ /* we will not run this far */
} }

View File

@@ -30,7 +30,7 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE #define FATAL_ERROR_EXPECTED_IS_INTERNAL TRUE
#define FATAL_ERROR_EXPECTED_ERROR EAGAIN #define FATAL_ERROR_EXPECTED_ERROR EAGAIN
void force_error() void force_error(void)
{ {
/* we will not run this far */ /* we will not run this far */
} }

View File

@@ -18,7 +18,7 @@ void test( void );
void test( void ) void test( void )
{ {
void (*signal_function_pointer)(); void (*signal_function_pointer)(int);
int signal_number; int signal_number;
signal_number = SIGALRM; signal_number = SIGALRM;

View File

@@ -29,11 +29,6 @@ void *POSIX_Init(
) )
{ {
int status; int status;
unsigned int remaining;
uint32_t *key_data;
Heap_Information_block info;
void *temp;
int i;
puts( "\n\n*** POSIX KEY 01 TEST ***" ); puts( "\n\n*** POSIX KEY 01 TEST ***" );

View File

@@ -42,7 +42,6 @@ void *POSIX_Init(
{ {
pthread_t thread; pthread_t thread;
int sc; int sc;
bool sb;
puts( "\n\n*** TEST KEY 03 ***" ); puts( "\n\n*** TEST KEY 03 ***" );

View File

@@ -110,7 +110,7 @@ char *Build_Queue_Name( int i ) {
return Queue_Name; return Queue_Name;
} }
void open_test_queues() void open_test_queues(void)
{ {
struct mq_attr attr; struct mq_attr attr;
int status; int status;
@@ -146,7 +146,7 @@ void open_test_queues()
* opened but closes the rest. * opened but closes the rest.
*/ */
void validate_mq_open_error_codes() void validate_mq_open_error_codes(void)
{ {
int i; int i;
mqd_t n_mq2; mqd_t n_mq2;
@@ -291,7 +291,7 @@ void validate_mq_open_error_codes()
} }
} }
void validate_mq_unlink_error_codes() void validate_mq_unlink_error_codes(void)
{ {
int status; int status;
@@ -349,7 +349,7 @@ void validate_mq_unlink_error_codes()
fatal_posix_service_status( errno, EINVAL, "mq_unlink errno value"); fatal_posix_service_status( errno, EINVAL, "mq_unlink errno value");
} }
void validate_mq_close_error_codes() void validate_mq_close_error_codes(void)
{ {
int status; int status;
@@ -366,7 +366,7 @@ void validate_mq_close_error_codes()
} }
void validate_mq_getattr_error_codes() void validate_mq_getattr_error_codes(void)
{ {
struct mq_attr attr; struct mq_attr attr;
int status; int status;
@@ -523,7 +523,7 @@ int empty_message_queues(
* first queue. * first queue.
*/ */
int validate_mq_send_error_codes( ) int validate_mq_send_error_codes(void)
{ {
int status; int status;
int i; int i;
@@ -606,7 +606,7 @@ int validate_mq_send_error_codes( )
return i-1; return i-1;
} }
void validate_mq_receive_error_codes( ) void validate_mq_receive_error_codes(void)
{ {
int status; int status;
char message[100]; char message[100];
@@ -667,7 +667,7 @@ void validate_mq_receive_error_codes( )
*/ */
} }
void verify_open_functionality() void verify_open_functionality(void)
{ {
#if 0 #if 0
mqd_t n_mq; mqd_t n_mq;
@@ -687,7 +687,7 @@ void verify_open_functionality()
#endif #endif
} }
void verify_unlink_functionality() void verify_unlink_functionality(void)
{ {
mqd_t n_mq; mqd_t n_mq;
int status; int status;
@@ -716,7 +716,7 @@ void verify_unlink_functionality()
Test_q[ DEFAULT_RW ].mq = n_mq; Test_q[ DEFAULT_RW ].mq = n_mq;
} }
void verify_close_functionality() void verify_close_functionality(void)
{ {
int i; int i;
int status; int status;
@@ -769,7 +769,7 @@ void verify_timed_send_queue(
Test_q[que].count++; Test_q[que].count++;
} }
void verify_timed_send() void verify_timed_send(void)
{ {
int que; int que;
@@ -819,7 +819,7 @@ void verify_timed_receive_queue(
} }
void verify_timed_receive() void verify_timed_receive(void)
{ {
int que; int que;
@@ -834,7 +834,7 @@ void verify_timed_receive()
} }
#if (0) #if (0)
void verify_set_attr() void verify_set_attr(void)
{ {
struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ]; struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ];
struct mq_attr attr; struct mq_attr attr;
@@ -903,7 +903,7 @@ void wait_for_signal(
} }
} }
void verify_notify() void verify_notify(void)
{ {
struct sigevent event; struct sigevent event;
int status; int status;
@@ -988,7 +988,7 @@ void verify_notify()
} }
void verify_with_threads() void verify_with_threads(void)
{ {
int status; int status;
pthread_t id; pthread_t id;
@@ -1075,7 +1075,7 @@ void verify_with_threads()
} }
void validate_mq_setattr() void validate_mq_setattr(void)
{ {
struct mq_attr attr; struct mq_attr attr;
struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ]; struct mq_attr save_attr[ NUMBER_OF_TEST_QUEUES ];
@@ -1163,11 +1163,11 @@ void verify_timedout_mq_timedreceive(
fatal_int_service_status( status, -1, "mq_timedreceive status"); fatal_int_service_status( status, -1, "mq_timedreceive status");
/* FIXME: This is wrong. */
printf( "Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec ); printf( "Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec );
} }
void verify_mq_receive() void verify_mq_receive(void)
{ {
int que; int que;
@@ -1213,7 +1213,7 @@ void verify_timedout_mq_timedsend(
Test_q[que].count++; Test_q[que].count++;
} }
void verify_mq_send() void verify_mq_send(void)
{ {
int que; int que;
@@ -1307,7 +1307,7 @@ void *Task_3 (
* close and unlink all queues. * close and unlink all queues.
*/ */
verify_close_functionality( "Task_3: " ); verify_close_functionality();
puts( "Task_3: pthread_exit" ); puts( "Task_3: pthread_exit" );
pthread_exit( NULL ); pthread_exit( NULL );

View File

@@ -29,14 +29,8 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
int status;
unsigned int remaining;
struct mq_attr attr; struct mq_attr attr;
int que;
Heap_Information_block info;
void *temp;
mqd_t mq; mqd_t mq;
int i;
puts( "\n\n*** POSIX MESSAGE QUEUE 02 TEST ***" ); puts( "\n\n*** POSIX MESSAGE QUEUE 02 TEST ***" );

View File

@@ -42,7 +42,6 @@ void *POSIX_Init(
{ {
struct mq_attr attr; struct mq_attr attr;
int status; int status;
int msgBody;
rtems_id timer; rtems_id timer;
rtems_status_code rc; rtems_status_code rc;

View File

@@ -182,7 +182,7 @@ int compare_descending( const struct dirent **a, const struct dirent **b )
return i; return i;
} }
void test_across_mount() void test_across_mount(void)
{ {
rtems_filesystem_mount_table_entry_t *mt_entry; rtems_filesystem_mount_table_entry_t *mt_entry;
int status; int status;

View File

@@ -77,7 +77,6 @@ int main(
pthread_rwlockattr_t attr; pthread_rwlockattr_t attr;
int status; int status;
int p; int p;
pthread_t thread_id;
int i; int i;
struct timespec abstime; struct timespec abstime;

View File

@@ -84,10 +84,6 @@ void *POSIX_Init(
int status; int status;
struct sigaction act; struct sigaction act;
sigset_t mask; sigset_t mask;
sigset_t pending_set;
sigset_t oset;
struct timespec timeout;
siginfo_t info;
sighandler_t oldHandler; sighandler_t oldHandler;
sighandler_t newHandler; sighandler_t newHandler;
rtems_interval start, end; rtems_interval start, end;

View File

@@ -33,8 +33,6 @@ void Install_Signal_Handler(
{ {
int sc; int sc;
sigset_t mask; sigset_t mask;
sigset_t pending_set;
sigset_t oset;
sc = sigemptyset( &mask ); sc = sigemptyset( &mask );
assert( !sc ); assert( !sc );

View File

@@ -85,8 +85,6 @@ void *Test_Thread(void *arg)
int sc; int sc;
sigset_t mask; sigset_t mask;
sigset_t wait_mask; sigset_t wait_mask;
sigset_t pending_set;
sigset_t oset;
siginfo_t info; siginfo_t info;
if ( blocked ) if ( blocked )
@@ -141,7 +139,6 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
int i;
int sc; int sc;
pthread_t id; pthread_t id;
struct sigaction act; struct sigaction act;

View File

@@ -65,11 +65,7 @@ int main(
#endif #endif
{ {
pthread_spinlock_t spinlock; pthread_spinlock_t spinlock;
pthread_spinlock_t spinlockExtra;
int status; int status;
int p;
pthread_t thread_id;
int i;
rtems_status_code rstatus; rtems_status_code rstatus;
rtems_id taskid; rtems_id taskid;

View File

@@ -50,12 +50,7 @@ int main(
) )
#endif #endif
{ {
pthread_spinlock_t spinlock;
pthread_spinlock_t spinlockExtra;
int status; int status;
int p;
pthread_t thread_id;
int i;
rtems_status_code rstatus; rtems_status_code rstatus;
rtems_id taskid; rtems_id taskid;

View File

@@ -46,7 +46,6 @@ void *POSIX_Init(
void *argument void *argument
) )
{ {
int i;
int sc; int sc;
pthread_t id; pthread_t id;
pthread_attr_t attr; pthread_attr_t attr;

View File

@@ -325,7 +325,7 @@ void make_multiple_links(
} }
void make_too_many_links() void make_too_many_links(void)
{ {
int i; int i;
int status; int status;
@@ -379,7 +379,7 @@ void make_a_symlink(
assert( !status ); assert( !status );
} }
void make_multiple_symlinks() void make_multiple_symlinks(void)
{ {
int status; int status;
@@ -467,7 +467,7 @@ void make_multiple_directories(
*/ */
void Cause_faults() void Cause_faults(void)
{ {
int fd; int fd;
int status; int status;
@@ -711,7 +711,7 @@ void Cause_faults()
} }
void Show_Time() void Show_Time(void)
{ {
rtems_time_of_day time; rtems_time_of_day time;
rtems_status_code status; rtems_status_code status;

View File

@@ -53,13 +53,6 @@ void *POSIX_Init(
useconds_t result; useconds_t result;
struct sigaction act; struct sigaction act;
sigset_t mask; sigset_t mask;
sigset_t pending_set;
sigset_t oset;
struct timespec timeout;
siginfo_t info;
sighandler_t oldHandler;
sighandler_t newHandler;
rtems_interval start, end;
puts( "\n\n*** POSIX TEST UALARM ***" ); puts( "\n\n*** POSIX TEST UALARM ***" );