diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-01-21 13:08:25 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-01-21 14:11:37 +1000 |
commit | 9510dedad875099c32993246188050ea73ab1a9f (patch) | |
tree | 2471fbf77a8fef9e3e57ac4cb757472d6cb96016 /compat.c | |
parent | ff6a19ed8898ee8c79b2b2a2f87806353d89f5d4 (diff) |
Replace WARN[1-9], ERROR[1-9], etc. with their unnumbered version
Those macros date back to when varargs weren't a thing but they've
been #defined to the same value for 17 years now.
Patch generated with:
for action in WARN INFO ERROR ACTION FATAL WSGO; do
sed -i "s/${action}[1-9]/${action}/g" `git ls-files`
done
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'compat.c')
-rw-r--r-- | compat.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -211,7 +211,7 @@ AddInterp(CompatInfo * info, SymInterpInfo * new) if (((old->defs.fileID == new->defs.fileID) && (warningLevel > 0)) || (warningLevel > 9)) { - WARN1("Multiple definitions for \"%s\"\n", siText(new, info)); + WARN("Multiple definitions for \"%s\"\n", siText(new, info)); ACTION("Earlier interpretation ignored\n"); } *old = *new; @@ -248,8 +248,8 @@ AddInterp(CompatInfo * info, SymInterpInfo * new) } if (collide) { - WARN1("Multiple interpretations of \"%s\"\n", siText(new, info)); - ACTION1("Using %s definition for duplicate fields\n", + WARN("Multiple interpretations of \"%s\"\n", siText(new, info)); + ACTION("Using %s definition for duplicate fields\n", (new->defs.merge != MergeAugment ? "last" : "first")); } return True; @@ -277,8 +277,8 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC) if (((gc->defined && gc->fileID == newGC->fileID) && (warningLevel > 0)) || (warningLevel > 9)) { - WARN1("Compat map for group %d redefined\n", group + 1); - ACTION1("Using %s definition\n", + WARN("Compat map for group %d redefined\n", group + 1); + ACTION("Using %s definition\n", (merge == MergeAugment ? "old" : "new")); } if(newGC->defined && (merge != MergeAugment || !gc->defined)) @@ -319,7 +319,7 @@ ResolveStateAndPredicate(ExprDef * expr, *pred_rtrn = XkbSI_Exactly; else { - ERROR1("Illegal modifier predicate \"%s\"\n", pred_txt); + ERROR("Illegal modifier predicate \"%s\"\n", pred_txt); ACTION("Ignored\n"); return False; } @@ -699,9 +699,9 @@ HandleGroupCompatDef(GroupCompatDef * def, merge = def->merge; if (!XkbIsLegalGroup(def->group - 1)) { - ERROR1("Keyboard group must be in the range 1..%d\n", + ERROR("Keyboard group must be in the range 1..%d\n", XkbNumKbdGroups + 1); - ACTION1("Compatibility map for illegal group %d ignored\n", + ACTION("Compatibility map for illegal group %d ignored\n", def->group); return False; } @@ -710,7 +710,7 @@ HandleGroupCompatDef(GroupCompatDef * def, if (!ExprResolveModMask(def->def, &val, LookupVModMask, (XPointer) xkb)) { ERROR("Expected a modifier mask in group compatibility definition\n"); - ACTION1("Ignoring illegal compatibility map for group %d\n", + ACTION("Ignoring illegal compatibility map for group %d\n", def->group); return False; } @@ -773,7 +773,7 @@ HandleCompatMapFile(XkbFile * file, info->errorCount++; break; default: - WSGO1("Unexpected statement type %d in HandleCompatMapFile\n", + WSGO("Unexpected statement type %d in HandleCompatMapFile\n", stmt->stmtType); break; } @@ -783,7 +783,7 @@ HandleCompatMapFile(XkbFile * file, #ifdef NOISY ERROR("Too many errors\n"); #endif - ACTION1("Abandoning compatibility map \"%s\"\n", file->topName); + ACTION("Abandoning compatibility map \"%s\"\n", file->topName); break; } } @@ -846,7 +846,7 @@ CompileCompatMap(XkbFile * file, else { WSGO("Couldn't allocate space for compat name\n"); - ACTION2("Name \"%s\" (from %s) NOT assigned\n", + ACTION("Name \"%s\" (from %s) NOT assigned\n", scanFile, info.name); } } |