summaryrefslogtreecommitdiff
path: root/compat.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-08-28 15:20:56 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-08-29 09:42:38 +1000
commit839ccda42d8b088d94324cd77c4be954859914d3 (patch)
tree7bb41dbf919b645c68dfd46eff8fd4f3c7635b3d /compat.c
parent24d18e0a844041ef82441adb16aa18cc4b4814ae (diff)
compat: don't warn about redefinition when nothing is defined yet
info->groupCompat[i] is bzero'd on init, define is 0. Don't warn when that is the case, otherwise any "group 2 = ..." statement will cause an error. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'compat.c')
-rw-r--r--compat.c2
1 files changed, 1 insertions, 1 deletions
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);