[Fontconfig] Config Parsing Error Reporting

Akira TAGOH akira at tagoh.org
Sat Jul 6 04:08:01 UTC 2019


FcConfigParseAndLoadFromMemoryInternal() is being shared by some functions
and there are some duplicate messages in it. That flag is to avoid such
thing though, it should be fixed by returning ret instead of FcTrue at the
last line of that function.

2019年7月6日(土) 13:01 Lawrence D'Oliveiro <ldo at geek-central.gen.nz>:

> 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?
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/fontconfig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20190706/6b28f347/attachment.html>


More information about the Fontconfig mailing list