summaryrefslogtreecommitdiff
path: root/keycodes.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2010-06-15 19:26:19 +0100
committerDaniel Stone <daniel@fooishbar.org>2010-06-15 19:26:49 +0100
commit0b04ecbb7a6afb223c91d3b15baab0bc48542281 (patch)
treeaa0149701a01996f89398cfd41786c8bf58e31d9 /keycodes.c
parent41b0857c8c1179b87a26888588cbfff28f8bb0d6 (diff)
Fix gcc warnings
It was right too: printf was being misused in some spots. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'keycodes.c')
-rw-r--r--keycodes.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/keycodes.c b/keycodes.c
index 1bff7fa..13579ec 100644
--- a/keycodes.c
+++ b/keycodes.c
@@ -158,7 +158,6 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
{
IndicatorNameInfo *old;
Bool replace;
- const char *action;
replace = (new->defs.merge == MergeReplace) ||
(new->defs.merge == MergeOverride);
@@ -176,23 +175,22 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
{
if (replace)
old->virtual = new->virtual;
- action = "Using %s instead of %s\n";
+ ACTION2("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");
}
- ACTION2(action, (old->virtual ? "virtual" : "real"),
- (old->virtual ? "real" : "virtual"));
return True;
}
else
{
if (replace)
- action = "Ignoring %d, using %d\n";
+ ACTION2("Ignoring %d, using %d\n", old->ndx, new->ndx);
else
- action = "Using %d, ignoring %d\n";
- ACTION2(action, old->ndx, new->ndx);
+ ACTION2("Using %d, ignoring %d\n", old->ndx, new->ndx);
}
if (replace)
{
@@ -224,7 +222,7 @@ AddIndicatorName(KeyNamesInfo * info, IndicatorNameInfo * new)
{
WARN1("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;