1
0
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:
Carlos R. Mafra
2009-08-18 16:28:43 +02:00
parent cb31fd374c
commit e2d8cbe238

View File

@@ -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;