From: Behdad Esfahbod Date: Mon, 31 Dec 2012 01:08:42 +0000 (-0600) Subject: Don't warn if an unknown element is used in an expression X-Git-Tag: 2.10.91~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fbb0b3b15774c187c697a80fb3c89bc1f3e0006;p=platform%2Fupstream%2Ffontconfig.git 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 --- 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)); }