New Ghostscript/GhostPDL compiler warnings - 2019-05-08-15:00:02 - 2019db2e552653bd0c27377d500de1041c9fd0bc
[email protected] Wed, 8 May 2019 17:48:04 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20190509004805.031CB2040527@i7> |
Previous Revision: 0d75869134c69963406500b536fb1bb1c97c8621 Current Revision: 2019db2e552653bd0c27377d500de1041c9fd0bc commit 2019db2e552653bd0c27377d500de1041c9fd0bc Author: Ken Sharp <[email protected]> AuthorDate: Wed May 8 14:27:23 2019 +0100 CommitDate: Wed May 8 15:27:28 2019 +0100 PostScript colour space handling We were not catering for a /Subtype in a DeviceN attributes dictionary having a value which is a string type not a name type. I can't quite see how we are ending up with a string type here, since the PDF file has it as a name, but it does. Dealing with both resolves many errors. The second change is more far-reaching; when processing an attributes dictionary for a DeviceN colour space we may need to create colour spaces for the Process dictionary /ColorSpace and for any of the entries in the Colorants dictionary. We were doing that by calling zsetcolorspace() which mostly works well, however there is one optimisation which can cause a problem; if the target space is the same as the current *interpreter* colour space, then zsetcolorspace() simply returns. The problem is that if we are halfway through processing a DeviceN space then we haven't set the interpreter space to the new colour space array yet which can mean that we incorrectly detect one of the target spaces as being the same as the current space. This leads to us trying to use the current space in the graphics state (the DeviceN space) as the target space, with unfortunate consequences. So create a new version of zsetcolorspace which doesn't do that optimisation and use that when processing the various target spaces in the DeviceN attributes dictionary. psi/zcolor.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609): ./psi/zcolor.c:546:10: warning: unused variable 'is_CIE' [-Wunused-variable] http://miles.ghostscript.com:8080/artifex/2019db2e552653bd0c27377d500de1041c9fd0bc/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./psi/zcolor.c:546:10: warning: unused variable 'is_CIE' [-Wunused-variable] bool is_CIE; ^ http://miles.ghostscript.com:8080/artifex/2019db2e552653bd0c27377d500de1041c9fd0bc/gs-clang-warnings.txt new scan-build warnings: ./psi/zcolor.c:546:10: warning: unused variable 'is_CIE' [-Wunused-variable] bool is_CIE; ^ http://miles.ghostscript.com:8080/artifex/2019db2e552653bd0c27377d500de1041c9fd0bc/gs/index.html http://miles.ghostscript.com:8080/artifex/2019db2e552653bd0c27377d500de1041c9fd0bc/gs-scan-build.txt