Commit 94e0be0dc7a642c7b650284347e6723facf7c56e

Ran Benita 2014-02-08T00:42:54

test/state: fix tautological test test/state.c:376:5: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/test/state.c b/test/state.c
index 507ccfc..89b3c2f 100644
--- a/test/state.c
+++ b/test/state.c
@@ -373,7 +373,7 @@ test_caps_keysym_transformation(struct xkb_keymap *keymap)
 
     caps = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_CAPS);
     shift = xkb_keymap_mod_get_index(keymap, XKB_MOD_NAME_SHIFT);
-    assert(caps >= 0 && shift >= 0);
+    assert(caps != XKB_MOD_INVALID && shift != XKB_MOD_INVALID);
 
     assert(xkb_state_key_get_layout(state, KEY_A + 8) == 0);
     assert(xkb_state_key_get_layout(state, KEY_SEMICOLON + 8) == 0);