[PATCH xkbcomp] compat: don't warn about redefinition when nothing is defined yet

Peter Hutterer peter.hutterer at who-t.net
Tue Aug 27 22:23:59 PDT 2013


info->groupCompat[i] is bzero'd on init, define is 0. Don't warn when that
is the case, otherwise any "group X = ..." statement will cause a warning.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compat.c b/compat.c
index 2b00142..f4d82a6 100644
--- a/compat.c
+++ b/compat.c
@@ -274,7 +274,7 @@ AddGroupCompat(CompatInfo * info, unsigned group, GroupCompatInfo * newGC)
     {
         return True;
     }
-    if (((gc->fileID == newGC->fileID) && (warningLevel > 0))
+    if (((gc->defined && gc->fileID == newGC->fileID) && (warningLevel > 0))
         || (warningLevel > 9))
     {
         WARN1("Compat map for group %d redefined\n", group + 1);
-- 
1.8.2.1



More information about the xorg-devel mailing list