From 60da9eab8463052d9196dae774aa91251f06db66 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 12 Jan 2015 19:56:24 +0100 Subject: Silenced some -Wunused-value warnings in sigemptyset and sigaddset calls - Fixes warnings when gcc-4.9 is used, with headers (such as Apple's) that define those symbols as `#define sigemptyset(set) (*(set) = 0, 0)` - See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081 Signed-off-by: Haru --- src/common/thread.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/common/thread.c b/src/common/thread.c index a00bd6333..95212b4b0 100644 --- a/src/common/thread.c +++ b/src/common/thread.c @@ -10,10 +10,7 @@ #include "thread.h" -#include "../common/sysinfo.h" // sysinfo->getpagesize() #include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/showmsg.h" #ifdef WIN32 # include "../common/winapi.h" @@ -27,6 +24,10 @@ # include #endif +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/sysinfo.h" // sysinfo->getpagesize() + // When Compiling using MSC (on win32..) we know we have support in any case! #ifdef _MSC_VER #define HAS_TLS @@ -122,10 +123,10 @@ static void *raThreadMainRedirector( void *p ){ // the threads inherits the Signal mask from the thread which spawned // this thread // so we've to block everything we don't care about. - sigemptyset(&set); - sigaddset(&set, SIGINT); - sigaddset(&set, SIGTERM); - sigaddset(&set, SIGPIPE); + (void)sigemptyset(&set); + (void)sigaddset(&set, SIGINT); + (void)sigaddset(&set, SIGTERM); + (void)sigaddset(&set, SIGPIPE); pthread_sigmask(SIG_BLOCK, &set, NULL); -- cgit v1.2.3-70-g09d2