xkbcomp: keycodes: Silence gcc warnings
authorDaniel Stone <daniel@fooishbar.org>
Tue, 15 Jun 2010 15:41:10 +0000 (16:41 +0100)
committerDaniel Stone <daniel@fooishbar.org>
Tue, 22 Jun 2010 14:56:56 +0000 (15:56 +0100)
It was right to warn us: some of these were actually bogus.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/xkbcomp/keycodes.c

index 847cfb8..70bcdbe 100644 (file)
@@ -160,7 +160,6 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
 {
     IndicatorNameInfo *old;
     Bool replace;
-    const char *action;
 
     replace = (new->defs.merge == MergeReplace) ||
         (new->defs.merge == MergeOverride);
@@ -177,23 +176,22 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
                 {
                     if (replace)
                         old->virtual = new->virtual;
-                    action = "Using %s instead of %s\n";
+                    ACTION("Using %s instead of %s\n",
+                           (old->virtual ? "virtual" : "real"),
+                           (old->virtual ? "real" : "virtual"));
                 }
                 else
                 {
-                    action = "Identical definitions ignored\n";
+                    ACTION("Identical definitions ignored\n");
                 }
-                ACTION(action, (old->virtual ? "virtual" : "real"),
-                        (old->virtual ? "real" : "virtual"));
                 return True;
             }
             else
             {
                 if (replace)
-                    action = "Ignoring %d, using %d\n";
+                    ACTION("Ignoring %d, using %d\n", old->ndx, new->ndx);
                 else
-                    action = "Using %d, ignoring %d\n";
-                ACTION(action, old->ndx, new->ndx);
+                    ACTION("Using %d, ignoring %d\n", old->ndx, new->ndx);
             }
             if (replace)
             {
@@ -225,7 +223,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
         {
             WARN("Multiple names for indicator %d\n", new->ndx);
             if ((old->name == new->name) && (old->virtual == new->virtual))
-                action = "Identical definitions ignored\n";
+                ACTION("Identical definitions ignored\n");
             else
             {
                 const char *oldType, *newType;