New Ghostscript/GhostPDL compiler warnings - 2019-05-06-01:21:30 - 76022c9c27a0f4031553cf3a5eb2c009b26b19be
[email protected] Mon, 6 May 2019 05:01:31 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20190506120131.3B5072040622@i7> |
Previous Revision: 8b407511d2fad0108a76c6b46dc54a1770ea3ade Current Revision: 76022c9c27a0f4031553cf3a5eb2c009b26b19be commit 76022c9c27a0f4031553cf3a5eb2c009b26b19be Author: Ken Sharp <[email protected]> AuthorDate: Mon May 6 09:10:22 2019 +0100 CommitDate: Mon May 6 09:10:22 2019 +0100 DeviceN - store C strings for Colorant names, not name indices For DeviceN spaces with an attributes dictionary containing a Colorants dictionary we were storing the Colorant names as a name index (index into the interpreter name table). Additionally we store a procedure callback to recover the C string from the name index. This is problematic for several reasons; firstly it requires all the interpreters to either have a name table or some close equivalent so that a C string can be recovered from a numeric value. Secondly the lifetime of the string is divorced from the lifetime of the C structure using it. Because there's no easy way for the interpreter to know when the graphics library has freed the colour space structure the interpreter is forced to retain the relationship between the name index and the C string until the job is completed. Both of these will be problems for the new PDF interpreter, so this is step 1 in altering this. After this we will still need to change the storage of the DeviceN and Separation ink names, which are handled the same way. base/gscdevn.c base/gscdevn.h base/gxcdevn.h devices/vector/gdevpdfc.c devices/vector/gdevpdfg.c psi/zcolor.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609): ./psi/zcolor.c:3714:41: warning: unused variable 'sname' [-Wunused-variable] http://miles.ghostscript.com:8080/artifex/76022c9c27a0f4031553cf3a5eb2c009b26b19be/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./psi/zcolor.c:3714:41: warning: unused variable 'sname' [-Wunused-variable] ref dict, *pdict = &dict, space[2], sname; ^ http://miles.ghostscript.com:8080/artifex/76022c9c27a0f4031553cf3a5eb2c009b26b19be/gs-clang-warnings.txt new scan-build warnings: ./psi/zcolor.c:3714:41: warning: unused variable 'sname' [-Wunused-variable] ref dict, *pdict = &dict, space[2], sname; ^ http://miles.ghostscript.com:8080/artifex/76022c9c27a0f4031553cf3a5eb2c009b26b19be/gs/index.html http://miles.ghostscript.com:8080/artifex/76022c9c27a0f4031553cf3a5eb2c009b26b19be/gs-scan-build.txt