summaryrefslogtreecommitdiff
path: root/src/common/thread.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-12 19:56:24 +0100
committerHaru <haru@dotalux.com>2015-01-12 19:56:24 +0100
commit60da9eab8463052d9196dae774aa91251f06db66 (patch)
tree607e4011ef1fd5750a04ba3533adfefec90fb9fa /src/common/thread.c
parent4952149c515b200cbf721f68a9bdeea11e661c5f (diff)
downloadhercules-60da9eab8463052d9196dae774aa91251f06db66.tar.gz
hercules-60da9eab8463052d9196dae774aa91251f06db66.tar.bz2
hercules-60da9eab8463052d9196dae774aa91251f06db66.tar.xz
hercules-60da9eab8463052d9196dae774aa91251f06db66.zip
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 <haru@dotalux.com>
Diffstat (limited to 'src/common/thread.c')
-rw-r--r--src/common/thread.c15
1 files changed, 8 insertions, 7 deletions
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 <unistd.h>
#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);