* sysdeps/pthread/pthread.h (pthread_cleanup_push,

pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
	g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
This commit is contained in:
Ulrich Drepper 2007-11-20 22:48:12 +00:00
parent ee72b97189
commit 77f1e09a99
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-11-20 Jakub Jelinek <jakub@redhat.com>
* sysdeps/pthread/pthread.h (pthread_cleanup_push,
pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2007-11-08 Ulrich Drepper <drepper@redhat.com> 2007-11-08 Ulrich Drepper <drepper@redhat.com>
[BZ #5240] [BZ #5240]

View File

@ -638,7 +638,7 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
__pthread_unwind_buf_t __cancel_buf; \ __pthread_unwind_buf_t __cancel_buf; \
void (*__cancel_routine) (void *) = (routine); \ void (*__cancel_routine) (void *) = (routine); \
void *__cancel_arg = (arg); \ void *__cancel_arg = (arg); \
int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) \ int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \ __cancel_buf.__cancel_jmp_buf, 0); \
if (__builtin_expect (not_first_call, 0)) \ if (__builtin_expect (not_first_call, 0)) \
{ \ { \
@ -672,7 +672,7 @@ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
__pthread_unwind_buf_t __cancel_buf; \ __pthread_unwind_buf_t __cancel_buf; \
void (*__cancel_routine) (void *) = (routine); \ void (*__cancel_routine) (void *) = (routine); \
void *__cancel_arg = (arg); \ void *__cancel_arg = (arg); \
int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) \ int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \ __cancel_buf.__cancel_jmp_buf, 0); \
if (__builtin_expect (not_first_call, 0)) \ if (__builtin_expect (not_first_call, 0)) \
{ \ { \