mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user