This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-84-g5452bff
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 11 Jan 2012 16:57:20 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-84-g5452bff
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 5452bffeefe076a12eeb04f784ef1209a4282038 (commit)
from daa891c0e8900d0f03c16fde9c09f8d6f9a26a7d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5452bffeefe076a12eeb04f784ef1209a4282038
commit 5452bffeefe076a12eeb04f784ef1209a4282038
Author: Ulrich Drepper <drepper@gmail.com>
Date: Wed Jan 11 11:56:30 2012 -0500
Fix warnings due to return in void functions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 34f4ce1..0b7c5e7 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-11 Marek Polacek <polacek@redhat.com>
+
+ * forward.c (FORWARD_NORETURN): Define macro.
+ (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
+ (__pthread_exit): Likewise.
+
2012-01-10 Ulrich Drepper <drepper@gmail.com>
* sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
diff --git a/nptl/forward.c b/nptl/forward.c
index b62efd8..18e1901 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -42,6 +42,17 @@ name decl \
return PTHFCT_CALL (ptr_##name, params); \
}
+/* Same as FORWARD2, only without return. */
+#define FORWARD_NORETURN(name, rettype, decl, params, defaction) \
+rettype \
+name decl \
+{ \
+ if (!__libc_pthread_functions_init) \
+ defaction; \
+ \
+ PTHFCT_CALL (ptr_##name, params); \
+}
+
#define FORWARD(name, decl, params, defretval) \
FORWARD2 (name, int, decl, params, return defretval)
@@ -160,8 +171,8 @@ FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
(thread1, thread2), 1)
-/* Use an alias to avoid warning, as pthread_exit is declared noreturn. */
-FORWARD2 (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS))
+FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval),
+ exit (EXIT_SUCCESS))
strong_alias (__pthread_exit, pthread_exit);
@@ -192,8 +203,7 @@ FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate),
FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
-#define return /* value is void */
-FORWARD2(__pthread_unwind,
+FORWARD_NORETURN(__pthread_unwind,
void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute
attribute_compat_text_section,
(__pthread_unwind_buf_t *buf), (buf), {
@@ -201,4 +211,3 @@ FORWARD2(__pthread_unwind,
INTERNAL_SYSCALL_DECL (err);
INTERNAL_SYSCALL (kill, err, 1, SIGKILL);
})
-#undef return
-----------------------------------------------------------------------
Summary of changes:
nptl/ChangeLog | 6 ++++++
nptl/forward.c | 21 +++++++++++++++------
2 files changed, 21 insertions(+), 6 deletions(-)
hooks/post-receive
--
GNU C Library master sources