makekeys: Fix warning about not returning from function
authorDan Nicholson <dbn.lists@gmail.com>
Sat, 24 Jan 2009 02:12:04 +0000 (18:12 -0800)
committerDan Nicholson <dbn.lists@gmail.com>
Thu, 19 Mar 2009 23:25:34 +0000 (16:25 -0700)
If we've gotten through the for loop in the alias functions, then we
don't have a match.

src/makekeys/makekeys.c

index 8fa6dda..02b1efe 100644 (file)
@@ -116,11 +116,9 @@ get_keysym_alias(const char *buf, char *key, int index)
     }
 
     /* Didn't find a match */
-    if (i < 0) {
-        fprintf(stderr, "can't find matching definition %s for keysym %s\n",
-                alias, key);
-        return -1;
-    }
+    fprintf(stderr, "can't find matching definition %s for keysym %s\n",
+            alias, key);
+    return -1;
 }
 
 static int
@@ -166,11 +164,9 @@ get_xf86_keysym_alias(const char *buf, char *key, size_t len, int index)
     }
 
     /* Didn't find a match */
-    if (i < 0) {
-        fprintf(stderr, "can't find matching definition %s for keysym %s\n",
-                alias, key);
-        return -1;
-    }
+    fprintf(stderr, "can't find matching definition %s for keysym %s\n",
+            alias, key);
+    return -1;
 }
 
 int