Use warning code in xkeyboard-config test
[platform/upstream/libxkbcommon.git] / src / text.c
index ec8bdf8..290a5ae 100644 (file)
@@ -24,6 +24,8 @@
  *
  ********************************************************/
 
+#include "config.h"
+
 #include "keymap.h"
 #include "text.h"
 
@@ -204,6 +206,7 @@ const LookupEntry symInterpretMatchMaskNames[] = {
     { "AnyOf", MATCH_ANY },
     { "AllOf", MATCH_ALL },
     { "Exactly", MATCH_EXACTLY },
+    { NULL, 0 },
 };
 
 const char *
@@ -213,6 +216,9 @@ ModIndexText(struct xkb_context *ctx, const struct xkb_mod_set *mods,
     if (ndx == XKB_MOD_INVALID)
         return "none";
 
+    if (ndx == XKB_MOD_NONE)
+        return "None";
+
     if (ndx >= mods->num_mods)
         return NULL;