From 1fbb0b3b15774c187c697a80fb3c89bc1f3e0006 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 30 Dec 2012 19:08:42 -0600 Subject: [PATCH] Don't warn if an unknown element is used in an expression The type will be resolved at runtime... For example, we can do this now without getting a warning: false pixelsize pixelsize matrix pixelsizefixupfactor 0 0 pixelsizefixupfactor size pixelsizefixupfactor Previously the last edit was generating: Fontconfig warning: "/home/behdad/.local/etc/fonts/conf.d/00-scale-bitmap-fonts.conf", line 29: saw unknown, expected number --- src/fcxml.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fcxml.c b/src/fcxml.c index d31caf5..cf9c8dd 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -594,6 +594,10 @@ FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type) return; if (type == (FcType) -1) return; + /* It's perfectly fine to use user-define elements in expressions, + * so don't warn in that case. */ + if (value == (FcType) -1) + return; FcConfigMessage (parse, FcSevereWarning, "saw %s, expected %s", FcTypeName (value), FcTypeName (type)); } -- 2.7.4