Commit aa9c91943e63c5835671cbc8605b8351f77bceb0

Ran Benita 2013-08-02T14:41:19

scanner: fix compiler warning src/xkbcomp/scanner.c:158:17: warning: comparison of constant -1 with expression of type 'enum yytokentype' is always true [-Wtautological-constant-out-of-range-compare] if (tok != -1) return tok; ~~~ ^ ~~ Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/xkbcomp/scanner.c b/src/xkbcomp/scanner.c
index dcd7468..49df658 100644
--- a/src/xkbcomp/scanner.c
+++ b/src/xkbcomp/scanner.c
@@ -155,7 +155,7 @@ skip_more_whitespace_and_comments:
 
         /* Keyword. */
         tok = keyword_to_token(s->buf);
-        if (tok != -1) return tok;
+        if ((int) tok != -1) return tok;
 
         yylval->str = strdup(s->buf);
         if (!yylval->str)