[Fontconfig] Config Parsing Error Reporting

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Sat Jul 6 04:01:44 UTC 2019


On Thu, 4 Jul 2019 19:04:25 +0900, Akira TAGOH wrote:

> not returning FcFalse on fail is a bug.

The problem seems to be caused by the “complain = FcFalse;” line in
the _FcConfigParse routine in fcxml.c. Removing it as follows:

diff --git a/src/fcxml.c b/src/fcxml.c
index 2e5898e..4e7e76a 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -3604,7 +3604,6 @@ _FcConfigParse (FcConfig  *config,
     close (fd);
 
     ret = FcConfigParseAndLoadFromMemoryInternal (config, filename, FcStrBufDoneStatic (&sbuf), complain, load);
-    complain = FcFalse; /* no need to reclaim here */
 bail1:
     FcStrBufDestroy (&sbuf);
 bail0:

causes the parse routine to return false on error, as expected.

Any reason why that line is there?


More information about the Fontconfig mailing list