From 92a56f367e6635bebf4e519a49943c15d2981d85 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 29 Jan 2007 02:56:45 +0000 Subject: fixup prototype warnings --- test/pthread/ex1.c | 2 +- test/pthread/ex2.c | 10 +++++----- test/pthread/ex4.c | 6 +++--- test/pthread/ex5.c | 10 +++++----- test/pthread/ex6.c | 2 +- test/pthread/ex7.c | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'test/pthread') diff --git a/test/pthread/ex1.c b/test/pthread/ex1.c index a1b24c31a..4d9de03d8 100644 --- a/test/pthread/ex1.c +++ b/test/pthread/ex1.c @@ -7,7 +7,7 @@ #include #include "pthread.h" -void *process(void * arg) +static void *process(void * arg) { int i; printf("Starting process %s\n", (char *)arg); diff --git a/test/pthread/ex2.c b/test/pthread/ex2.c index 70cb6b398..98bd4b347 100644 --- a/test/pthread/ex2.c +++ b/test/pthread/ex2.c @@ -20,7 +20,7 @@ struct prodcons { /* Initialize a buffer */ -void init(struct prodcons * b) +static void init(struct prodcons * b) { pthread_mutex_init(&b->lock, NULL); pthread_cond_init(&b->notempty, NULL); @@ -31,7 +31,7 @@ void init(struct prodcons * b) /* Store an integer in the buffer */ -void put(struct prodcons * b, int data) +static void put(struct prodcons * b, int data) { pthread_mutex_lock(&b->lock); /* Wait until buffer is not full */ @@ -50,7 +50,7 @@ void put(struct prodcons * b, int data) /* Read and remove an integer from the buffer */ -int get(struct prodcons * b) +static int get(struct prodcons * b) { int data; pthread_mutex_lock(&b->lock); @@ -75,7 +75,7 @@ int get(struct prodcons * b) struct prodcons buffer; -void * producer(void * data) +static void * producer(void * data) { int n; for (n = 0; n < 10000; n++) { @@ -86,7 +86,7 @@ void * producer(void * data) return NULL; } -void * consumer(void * data) +static void * consumer(void * data) { int d; while (1) { diff --git a/test/pthread/ex4.c b/test/pthread/ex4.c index 11a09f013..cf4cf1d69 100644 --- a/test/pthread/ex4.c +++ b/test/pthread/ex4.c @@ -14,7 +14,7 @@ #if 0 -char * str_accumulate(char * s) +static char * str_accumulate(char * s) { static char accu[1024] = { 0 }; strcat(accu, s); @@ -40,7 +40,7 @@ static void str_alloc_destroy_accu(void * accu); /* Thread-safe version of str_accumulate */ -char * str_accumulate(const char * s) +static char * str_accumulate(const char * s) { char * accu; @@ -81,7 +81,7 @@ static void str_alloc_destroy_accu(void * accu) /* Test program */ -void * process(void * arg) +static void * process(void * arg) { char * res; res = str_accumulate("Result of "); diff --git a/test/pthread/ex5.c b/test/pthread/ex5.c index 475de0e0c..7a293eb01 100644 --- a/test/pthread/ex5.c +++ b/test/pthread/ex5.c @@ -19,7 +19,7 @@ struct prodcons { /* Initialize a buffer */ -void init(struct prodcons * b) +static void init(struct prodcons * b) { sem_init(&b->sem_write, 0, BUFFER_SIZE - 1); sem_init(&b->sem_read, 0, 0); @@ -29,7 +29,7 @@ void init(struct prodcons * b) /* Store an integer in the buffer */ -void put(struct prodcons * b, int data) +static void put(struct prodcons * b, int data) { /* Wait until buffer is not full */ sem_wait(&b->sem_write); @@ -43,7 +43,7 @@ void put(struct prodcons * b, int data) /* Read and remove an integer from the buffer */ -int get(struct prodcons * b) +static int get(struct prodcons * b) { int data; /* Wait until buffer is not empty */ @@ -64,7 +64,7 @@ int get(struct prodcons * b) struct prodcons buffer; -void * producer(void * data) +static void * producer(void * data) { int n; for (n = 0; n < 10000; n++) { @@ -75,7 +75,7 @@ void * producer(void * data) return NULL; } -void * consumer(void * data) +static void * consumer(void * data) { int d; while (1) { diff --git a/test/pthread/ex6.c b/test/pthread/ex6.c index 15914ce85..bb96ca5fa 100644 --- a/test/pthread/ex6.c +++ b/test/pthread/ex6.c @@ -4,7 +4,7 @@ #include #include -void * +static void * test_thread (void *v_param) { return NULL; diff --git a/test/pthread/ex7.c b/test/pthread/ex7.c index bda2ca9eb..93fc34a8c 100644 --- a/test/pthread/ex7.c +++ b/test/pthread/ex7.c @@ -22,7 +22,7 @@ typedef struct { event_t main_event; -void * +static void * test_thread (void *ms_param) { unsigned long status = 0; -- cgit v1.2.3