From b4e091562671505b8cf23288b06001a46f5fa3ef Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 27 Feb 2015 19:50:09 +0100 Subject: libc: silence warning include/bits/sigset.h:219:62: warning: right-hand operand of comma expression has no effect [-Wunused-value] include/bits/sigset.h:210:63: warning: right-hand operand of comma expression has no effect [-Wunused-value] Signed-off-by: Bernhard Reutner-Fischer --- libc/signal/sigaddset.c | 3 ++- libc/signal/sigdelset.c | 3 ++- libc/sysdeps/linux/common/bits/sigset.h | 21 +++++++++++---------- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'libc') diff --git a/libc/signal/sigaddset.c b/libc/signal/sigaddset.c index 7e800a7f1..837f65329 100644 --- a/libc/signal/sigaddset.c +++ b/libc/signal/sigaddset.c @@ -30,6 +30,7 @@ sigaddset (sigset_t *set, int signo) return -1; } - return __sigaddset (set, signo); + __sigaddset (set, signo); + return 0; } libc_hidden_def(sigaddset) diff --git a/libc/signal/sigdelset.c b/libc/signal/sigdelset.c index de3b12ff0..9f3ab6659 100644 --- a/libc/signal/sigdelset.c +++ b/libc/signal/sigdelset.c @@ -29,6 +29,7 @@ int sigdelset (sigset_t *set, int signo) return -1; } - return __sigdelset (set, signo); + __sigdelset (set, signo); + return 0; } libc_hidden_def(sigdelset) diff --git a/libc/sysdeps/linux/common/bits/sigset.h b/libc/sysdeps/linux/common/bits/sigset.h index beb859820..f220e8171 100644 --- a/libc/sysdeps/linux/common/bits/sigset.h +++ b/libc/sysdeps/linux/common/bits/sigset.h @@ -154,9 +154,9 @@ typedef struct { # if !defined __USE_EXTERN_INLINES || defined __PROVIDE_OUT_OF_LINE_SIGSETFN extern int __sigismember (const __sigset_t *, int); libc_hidden_proto(__sigismember) -extern int __sigaddset (__sigset_t *, int); +extern void __sigaddset (__sigset_t *, int); libc_hidden_proto(__sigaddset) -extern int __sigdelset (__sigset_t *, int); +extern void __sigdelset (__sigset_t *, int); libc_hidden_proto(__sigdelset) # endif @@ -169,18 +169,19 @@ libc_hidden_proto(__sigdelset) * will have its own copy of out-of line function emitted. */ # define _EXTERN_INLINE /*extern*/ __always_inline # endif -# define __SIGSETFN(NAME, BODY, CONST) \ -_EXTERN_INLINE int \ +# define __SIGSETFN(RET_TYPE, NAME, BODY, CONST) \ +_EXTERN_INLINE RET_TYPE \ NAME (CONST __sigset_t *__set, int __sig) \ { \ unsigned long __mask = __sigmask (__sig); \ unsigned __word = __sigword (__sig); \ - return BODY; \ + BODY; \ } -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) +__SIGSETFN (int, __sigismember, return (__set->__val[__word] & __mask) ? 1 : 0, + const) +__SIGSETFN (void, __sigaddset, (__set->__val[__word] |= __mask), ) +__SIGSETFN (void, __sigdelset, (__set->__val[__word] &= ~__mask), ) # undef __SIGSETFN # endif @@ -207,7 +208,7 @@ const_sigaddset(__sigset_t *set, int sig) set->__val[word] |= mask; } # define __sigaddset(set, sig) \ - (__builtin_constant_p(sig) ? (const_sigaddset(set, sig), 0) : __sigaddset(set, sig)) + (__builtin_constant_p(sig) ? const_sigaddset(set, sig) : __sigaddset(set, sig)) static __always_inline void const_sigdelset(__sigset_t *set, int sig) { @@ -216,7 +217,7 @@ const_sigdelset(__sigset_t *set, int sig) set->__val[word] &= ~mask; } # define __sigdelset(set, sig) \ - (__builtin_constant_p(sig) ? (const_sigdelset(set, sig), 0) : __sigdelset(set, sig)) + (__builtin_constant_p(sig) ? const_sigdelset(set, sig) : __sigdelset(set, sig)) # endif #endif /* ! _SIGSET_H_fns. */ -- cgit v1.2.3 From 8e5113112ae7d3402e2afb01c8cee18d3beb0f2e Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 3 Mar 2015 15:04:45 -0300 Subject: sparc/clone.S: guard tcb-offsets.h include with RESET_PID Otherwise we have a broken scenario with non-threading builds. Signed-off-by: Gustavo Zacarias Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/sparc/clone.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc') diff --git a/libc/sysdeps/linux/sparc/clone.S b/libc/sysdeps/linux/sparc/clone.S index 8d9da5ae5..1d0e3e6e1 100644 --- a/libc/sysdeps/linux/sparc/clone.S +++ b/libc/sysdeps/linux/sparc/clone.S @@ -22,7 +22,9 @@ #include #include +#ifdef RESET_PID #include +#endif #include #define CLONE_VM 0x00000100 -- cgit v1.2.3