From e2d8cbe238d54ce2242be475adfdf62f2637d107 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Tue, 18 Aug 2009 16:28:43 +0200 Subject: [PATCH] Remove unsigned type from 'mask' gcc-4.3.2 warns: defaults.c: In function 'getModMask': defaults.c:2586: warning: comparison of unsigned expression < 0 is always false The line in question is if (mask < 0) and 'mask' is the return of wXModifierFromKey() which is an 'int' and can indeed return a negative value (see src/xmodifier.c), so let 'mask' be an 'int' too. --- src/defaults.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/defaults.c b/src/defaults.c index 378c5813..f8c1756c 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -2574,7 +2574,7 @@ static int getModMask(WScreen *scr, WDefaultEntry *entry, WMPropList *value, void *addr, void **ret) { - static unsigned int mask; + static int mask; char *str; GET_STRING_OR_DEFAULT("Modifier Key", str); @@ -2590,7 +2590,7 @@ getModMask(WScreen *scr, WDefaultEntry *entry, WMPropList *value, void *addr, } if (addr) - *(unsigned int*)addr = mask; + *(int *)addr = mask; if (ret) *ret = &mask;