info->errorCount++;
ret = ReportNotArray("keyboard", field.str, "geometry");
}
- if (!ExprResolveFloat(stmt->value, &tmp))
+ else if (!ExprResolveFloat(stmt->value, &tmp))
{
info->errorCount++;
ret = ReportBadType("keyboard", field.str, "geometry", "number");
}
- if (tmp.ival < 1)
+ else if (tmp.ival < 1)
{
WARN("Keyboard height must be positive\n");
ACTION("Ignoring illegal keyboard height %s\n",
info->errorCount++;
ret = ReportNotArray("keyboard", field.str, "geometry");
}
- if (!ExprResolveString(stmt->value, &tmp))
+ else if (!ExprResolveString(stmt->value, &tmp))
{
info->errorCount++;
ret = ReportBadType("keyboard", field.str, "geometry", "string");
info->errorCount++;
ret = ReportNotArray("keyboard", field.str, "geometry");
}
- if (!ExprResolveString(stmt->value, &tmp))
+ else if (!ExprResolveString(stmt->value, &tmp))
{
info->errorCount++;
ret = ReportBadType("keyboard", field.str, "geometry", "string");
keyDef = (OverlayKeyDef *) keyDef->common.next)
{
key = uTypedCalloc(1, OverlayKeyInfo);
- if ((!key) && warningLevel > 0)
+ if (!key)
{
- WSGO("Couldn't allocate OverlayKeyInfo\n");
- ACTION("Overlay %s for section %s will be incomplete\n",
- XkbcAtomText(ol.name), scText(si));
+ if (warningLevel > 0)
+ {
+ WSGO("Couldn't allocate OverlayKeyInfo\n");
+ ACTION("Overlay %s for section %s will be incomplete\n",
+ XkbcAtomText(ol.name), scText(si));
+ }
return False;
}
strncpy(key->over, keyDef->over, XkbKeyNameLength);
break;
default:
ERROR("Cannot determine field for unnamed expression\n");
- ACTION("Ignoring key %d in row %d of section %s\n",
- row->nKeys + 1, row->section->nRows + 1,
- rowText(row));
+ if (row)
+ ACTION("Ignoring key %d in row %d of section %s\n",
+ row->nKeys + 1, row->section->nRows + 1,
+ rowText(row));
return False;
}
}
new = NextIndicatorName(info);
if (!new)
{
- WSGO("Couldn't allocate name for indicator %d\n", new->ndx);
+ WSGO("Couldn't allocate name for indicator %d\n", old->ndx);
ACTION("Ignored\n");
return False;
}
included = *info;
bzero(info, sizeof(KeyNamesInfo));
}
- else if (strcmp(stmt->file, "computed") == 0)
+ else if (stmt->file && strcmp(stmt->file, "computed") == 0)
{
xkb->flags |= AutoKeyNames;
info->explicitMin = 0;