summaryrefslogtreecommitdiff
path: root/test/signal
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-29 02:56:45 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-29 02:56:45 +0000
commit92a56f367e6635bebf4e519a49943c15d2981d85 (patch)
tree8d0cc34ab7791579c5e7979bc09b5ede8b1bc7be /test/signal
parent55aaeb574609ff7fb7ac93ce4ffe01be0a56f5b7 (diff)
fixup prototype warnings
Diffstat (limited to 'test/signal')
-rw-r--r--test/signal/sigchld.c12
-rw-r--r--test/signal/signal.c10
-rw-r--r--test/signal/tst-raise.c2
3 files changed, 12 insertions, 12 deletions
diff --git a/test/signal/sigchld.c b/test/signal/sigchld.c
index 60ddf4b3c..d53165419 100644
--- a/test/signal/sigchld.c
+++ b/test/signal/sigchld.c
@@ -7,16 +7,15 @@
#include <unistd.h>
-void test_handler(int signo)
+#ifdef __ARCH_USE_MMU__
+
+static void test_handler(int signo)
{
write(1, "caught SIGCHLD\n", 15);
return;
}
-
-#ifdef __ARCH_USE_MMU__
-
-int main(void)
+int main(void)
{
pid_t mypid;
struct sigaction siga;
@@ -31,7 +30,6 @@ int main(void)
fprintf(stderr, "sigaction choked: %s!", strerror(errno));
exit(EXIT_FAILURE);
}
-
/* Setup a child process to exercise the sig handling for us */
mypid = getpid();
@@ -52,7 +50,7 @@ int main(void)
sleep(10);
if (waitpid(-1, NULL, WNOHANG | WUNTRACED) > 0)
break;
- write(1, "after sleep\n", 12);
+ write(1, "after sleep\n", 12);
}
printf("Bye-bye! All done!\n");
diff --git a/test/signal/signal.c b/test/signal/signal.c
index 6e6f04a7a..01d1a785f 100644
--- a/test/signal/signal.c
+++ b/test/signal/signal.c
@@ -24,7 +24,7 @@
const char *it = "<UNSET>"; /* Routine name for message routines. */
size_t errors = 0;
-void check(int thing, int number)
+static void check(int thing, int number)
{
if (!thing) {
printf("%s: flunked test %d\n", it, number);
@@ -32,10 +32,12 @@ void check(int thing, int number)
}
}
-void equal(const char *a, const char *b, int number)
+#if 0
+static void equal(const char *a, const char *b, int number)
{
check(a != NULL && b != NULL && (strcmp(a, b) == 0), number);
}
+#endif
/* -------------------------------------------------*/
@@ -44,14 +46,14 @@ void equal(const char *a, const char *b, int number)
int global_int = 0;
-void set_global_int_to_one(int signum)
+static void set_global_int_to_one(int signum)
{
printf ("Received signal %d (%s).\n", signum, strsignal(signum));
global_int = 1;
return;
}
-void signal_test_1(void)
+static void signal_test_1(void)
{
global_int = 0;
diff --git a/test/signal/tst-raise.c b/test/signal/tst-raise.c
index 9e8e472be..d24c316cf 100644
--- a/test/signal/tst-raise.c
+++ b/test/signal/tst-raise.c
@@ -26,7 +26,7 @@
volatile int count;
-void
+static void
sh (int sig)
{
++count;