diff options
author | Thomas Schwinge <thomas@schwinge.name> | 2011-09-07 19:38:22 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@schwinge.name> | 2011-09-07 19:38:22 +0200 |
commit | 769e2108a0f5fc49eff9f3addbaf5f0646bcb253 (patch) | |
tree | 1bdd779e0d31890894bde59af4994d66c88026c9 | |
parent | c2a1b325b7b2ce0d3d16bd1e9430e1d7eddce71e (diff) |
Tiny build and GCC warning fixes.
* pthread/cthreads-compat.c: #include <stddef.h> for NULL.
* pthread/pt-exit.c (pthread_exit): Remove stray need_dealloc variable.
* sysdeps/generic/pt-attr-getschedparam.c: #include <string.h> for memcpy.
* sysdeps/mach/hurd/ia32/pt-setup.c (stack_setup): Apply some more typecasting.
* tests/test-1.c: #include <assert.h>.
* tests/test-6.c: Likewise.
* tests/test-7.c: Likewise.
* tests/test-16.c (handler): Take parameters for sa_handler, not sa_sigaction.
-rw-r--r-- | pthread/cthreads-compat.c | 1 | ||||
-rw-r--r-- | pthread/pt-exit.c | 1 | ||||
-rw-r--r-- | sysdeps/generic/pt-attr-getschedparam.c | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/ia32/pt-setup.c | 2 | ||||
-rw-r--r-- | tests/test-1.c | 1 | ||||
-rw-r--r-- | tests/test-16.c | 2 | ||||
-rw-r--r-- | tests/test-6.c | 1 | ||||
-rw-r--r-- | tests/test-7.c | 1 |
8 files changed, 7 insertions, 3 deletions
diff --git a/pthread/cthreads-compat.c b/pthread/cthreads-compat.c index e0536ef..799d3a4 100644 --- a/pthread/cthreads-compat.c +++ b/pthread/cthreads-compat.c @@ -19,6 +19,7 @@ #include <assert.h> #include <pthread.h> +#include <stddef.h> typedef void *cthread_t; typedef void *(*cthread_fn_t) (void *arg); diff --git a/pthread/pt-exit.c b/pthread/pt-exit.c index 5fe0ba8..3b3853e 100644 --- a/pthread/pt-exit.c +++ b/pthread/pt-exit.c @@ -35,7 +35,6 @@ pthread_exit (void *status) struct __pthread *self = _pthread_self (); struct __pthread_cancelation_handler **handlers; int oldstate; - int need_dealloc; /* Run any cancelation handlers. According to POSIX, the cancellation cleanup handlers should be called with cancellation diff --git a/sysdeps/generic/pt-attr-getschedparam.c b/sysdeps/generic/pt-attr-getschedparam.c index 6c3f15b..190cf9d 100644 --- a/sysdeps/generic/pt-attr-getschedparam.c +++ b/sysdeps/generic/pt-attr-getschedparam.c @@ -19,6 +19,7 @@ #include <pthread.h> #include <sched.h> +#include <string.h> #include <pt-internal.h> diff --git a/sysdeps/mach/hurd/ia32/pt-setup.c b/sysdeps/mach/hurd/ia32/pt-setup.c index ba438d6..7eb223c 100644 --- a/sysdeps/mach/hurd/ia32/pt-setup.c +++ b/sysdeps/mach/hurd/ia32/pt-setup.c @@ -64,7 +64,7 @@ stack_setup (struct __pthread *thread, { /* And then the call frame. */ top -= 2; - top = (uintptr_t) top & ~0xf; + top = (uintptr_t *) ((uintptr_t) top & ~0xf); top[1] = (uintptr_t) arg; /* Argument to START_ROUTINE. */ top[0] = (uintptr_t) start_routine; *--top = 0; /* Fake return address. */ diff --git a/tests/test-1.c b/tests/test-1.c index 318fd6e..6ec1afb 100644 --- a/tests/test-1.c +++ b/tests/test-1.c @@ -1,6 +1,7 @@ #define _GNU_SOURCE #include <pthread.h> +#include <assert.h> #include <unistd.h> #include <error.h> #include <errno.h> diff --git a/tests/test-16.c b/tests/test-16.c index b6a52d0..3660f5f 100644 --- a/tests/test-16.c +++ b/tests/test-16.c @@ -33,7 +33,7 @@ test (void *arg) } static void -handler (int sig, siginfo_t *info, void *context) +handler (int sig) { assert (pthread_equal (pthread_self (), testthread)); printf ("handler: %d\n", pthread_self ()); diff --git a/tests/test-6.c b/tests/test-6.c index 98aa8ba..edf2919 100644 --- a/tests/test-6.c +++ b/tests/test-6.c @@ -3,6 +3,7 @@ #include <pthread.h> #include <stdio.h> #include <error.h> +#include <assert.h> #include <errno.h> #define THREADS 500 diff --git a/tests/test-7.c b/tests/test-7.c index bd97acf..8159be3 100644 --- a/tests/test-7.c +++ b/tests/test-7.c @@ -1,6 +1,7 @@ #define _GNU_SOURCE #include <pthread.h> +#include <assert.h> #include <stdio.h> #include <error.h> #include <errno.h> |