[git commit nptl] warning fixes
Austin Foxley
austinf at cetoncorp.com
Mon Sep 21 16:16:52 UTC 2009
commit: http://git.uclibc.org/uClibc/commit/?id=ecd7069ac6e33a4734f3c4e6d54cf8a6a374d678
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
libc/sysdeps/linux/common/bits/uClibc_pthread.h | 2 --
libpthread/nptl/allocatestack.c | 6 +++---
libpthread/nptl/pthread_create.c | 2 +-
libpthread/nptl/sysdeps/pthread/pthread.h | 3 ---
.../nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h | 1 +
5 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/libc/sysdeps/linux/common/bits/uClibc_pthread.h b/libc/sysdeps/linux/common/bits/uClibc_pthread.h
index 1d6209f..367f380 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_pthread.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_pthread.h
@@ -37,14 +37,12 @@ extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
extern void __uclibc_mutex_unlock (void *) attribute_hidden;
extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
-# ifndef __UCLIBC_HAS_THREADS_NATIVE__
extern void weak_function _pthread_cleanup_push_defer (
struct _pthread_cleanup_buffer *__buffer,
void (*__routine) (void *), void *__arg);
extern void weak_function _pthread_cleanup_pop_restore (
struct _pthread_cleanup_buffer *__buffer,
int __execute);
-# endif
#endif
#endif
diff --git a/libpthread/nptl/allocatestack.c b/libpthread/nptl/allocatestack.c
index 1e35f48..f0acf3b 100644
--- a/libpthread/nptl/allocatestack.c
+++ b/libpthread/nptl/allocatestack.c
@@ -34,7 +34,7 @@
#ifndef NEED_SEPARATE_REGISTER_STACK
/* Most architectures have exactly one stack pointer. Some have more. */
-# define STACK_VARIABLES void *stackaddr
+# define STACK_VARIABLES void *stackaddr = 0
/* How to pass the values to the 'create_thread' function. */
# define STACK_VARIABLES_ARGS stackaddr
@@ -53,7 +53,7 @@
/* We need two stacks. The kernel will place them but we have to tell
the kernel about the size of the reserved address space. */
-# define STACK_VARIABLES void *stackaddr; size_t stacksize
+# define STACK_VARIABLES void *stackaddr = 0; size_t stacksize
/* How to pass the values to the 'create_thread' function. */
# define STACK_VARIABLES_ARGS stackaddr, stacksize
@@ -388,7 +388,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
/* Allocate some anonymous memory. If possible use the cache. */
size_t guardsize;
size_t reqsize;
- void *mem;
+ void *mem = 0;
const int prot = (PROT_READ | PROT_WRITE);
#if COLORING_INCREMENT != 0
diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c
index 0b37b36..81da5b9 100644
--- a/libpthread/nptl/pthread_create.c
+++ b/libpthread/nptl/pthread_create.c
@@ -349,7 +349,7 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
accessing far-away memory. */
iattr = &default_attr;
- struct pthread *pd;
+ struct pthread *pd = 0;
int err = ALLOCATE_STACK (iattr, &pd);
if (__builtin_expect (err != 0, 0))
/* Something went wrong. Maybe a parameter of the attributes is
diff --git a/libpthread/nptl/sysdeps/pthread/pthread.h b/libpthread/nptl/sysdeps/pthread/pthread.h
index c4bfc0e..a4a3b3b 100644
--- a/libpthread/nptl/sysdeps/pthread/pthread.h
+++ b/libpthread/nptl/sysdeps/pthread/pthread.h
@@ -28,9 +28,6 @@
#include <bits/pthreadtypes.h>
#include <bits/setjmp.h>
#include <bits/wordsize.h>
-#if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc )
-#include <bits/uClibc_pthread.h>
-#endif
/* Detach state. */
diff --git a/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h b/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
index 5cef8b1..b9528f3 100644
--- a/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
+++ b/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
@@ -28,4 +28,5 @@
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
/* We use the normal lobngjmp for unwinding. */
+extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
--
1.6.3.3
More information about the uClibc-cvs
mailing list