From: Steve Rosenbluth Date: Sun, 1 Jun 2008 14:33:00 +0000 (+0200) Subject: signal.h: use an explicit cast to silent compiler warnings X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=141ae8478e2c45ce1ac9b480a979d7fa0f7fbc72;p=linux-kernel-docs%2Flinux-2.4.36.git signal.h: use an explicit cast to silent compiler warnings This patches include/linux/signal.h There is an implicit cast from an integer to an unsigned long (sigset_t) which causes compilers to generate warnings. Different compilers could possibly produce different code. This change has been tested over several years of use and is stable. Signed-off-by: Willy Tarreau --- diff --git a/include/linux/signal.h b/include/linux/signal.h index c4e6eb3b..e7878d9a 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -160,8 +160,8 @@ static inline void sigfillset(sigset_t *set) default: memset(set, -1, sizeof(sigset_t)); break; - case 2: set->sig[1] = -1; - case 1: set->sig[0] = -1; + case 2: set->sig[1] = (unsigned long)-1; + case 1: set->sig[0] = (unsigned long)-1; break; } } @@ -204,7 +204,7 @@ static inline void siginitsetinv(sigset_t *set, unsigned long mask) default: memset(&set->sig[1], -1, sizeof(long)*(_NSIG_WORDS-1)); break; - case 2: set->sig[1] = -1; + case 2: set->sig[1] = (unsigned long)-1; case 1: ; } }