New Ghostscript/GhostPDL compiler warnings - 2018-06-30-06:30:09 - aba212c73d6f10fe891786a938bb461636563dba
[email protected] Sat, 30 Jun 2018 08:02:56 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20180630150256.EDC4E2040653@i7> |
Previous Revision: 8d415abe6f1e0e3a7e895511e20d99eebad48ada Current Revision: aba212c73d6f10fe891786a938bb461636563dba commit aba212c73d6f10fe891786a938bb461636563dba Author: Ken Sharp <[email protected]> AuthorDate: Sat Jun 30 14:29:43 2018 +0100 CommitDate: Sat Jun 30 14:29:43 2018 +0100 pdfwrite - when changing ProcessColorModel, don't just change the name Bug 699490 "Broken PDF/X-3 generated" The reason that an empty file was generated was due to a mismatch between the underlying device process color model and the ICC profile attached to the device. The profile was a CMYK profile, while the device was set to have 3 components. This is due to the fact that setting the ProcessColorModel separately from the ColorConversionStrategy was not actually changing the model, it just changed the name. This should, of course, have generated an error and an earlier commit had already addressed that. In this commit, we call the routine which actually switches the colour model, and we also count down the ICC structure attached to the device, and set it to 0. This forces a reload of the ICC profile. That isn't needed for this particular bug but it is needed when OutputICCProfile is not set, because we will otherwise try to use the profile for the prior colour model, which will be incorrect and leaed to errors. devices/vector/gdevpdfp.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./devices/vector/gdevpdfp.c:484:44: warning: passing argument 3 of 'pdev->icc_struct->rc.free' makes pointer from integer without a cast [-Wint-conversion] http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./devices/vector/gdevpdfp.c:484:44: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'client_name_t' (aka 'const char *') [-Wint-conversion] rc_decrement(pdev->icc_struct, 1); ^ ./base/gsrefct.h:183:21: note: expanded from macro 'rc_decrement' rc_adjust(vp, -1, cname) ^~~~~ ./base/gsrefct.h:177:25: note: expanded from macro 'rc_adjust' rc_adjust_(vp, delta, cname, (vp) = 0) ^~~~~ ./base/gsrefct.h:170:28: note: expanded from macro 'rc_adjust_' rc_free_struct(vp, cname);\ ^~~~~ ./base/gsrefct.h:113:50: note: expanded from macro 'rc_free_struct' (vp)->rc.free((vp)->rc.memory, (void *)(vp), cname);\ ^~~~~ http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/gs-clang-warnings.txt new scan-build warnings: ./devices/vector/gdevpdfp.c:484:44: warning: passing argument 3 of 'pdev->icc_struct->rc.free' makes pointer from integer without a cast [-Wint-conversion] rc_decrement(pdev->icc_struct, 1); ^ http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/gs/index.html http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/gs-scan-build.txt GhostPCL: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./devices/vector/gdevpdfp.c:484:44: warning: passing argument 3 of 'pdev->icc_struct->rc.free' makes pointer from integer without a cast [-Wint-conversion] http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/pcl-gcc-warnings.txt new scan-build warnings: ./devices/vector/gdevpdfp.c:484:44: warning: passing argument 3 of 'pdev->icc_struct->rc.free' makes pointer from integer without a cast [-Wint-conversion] rc_decrement(pdev->icc_struct, 1); ^ http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/pcl/index.html http://miles.ghostscript.com:8080/artifex/aba212c73d6f10fe891786a938bb461636563dba/pcl-scan-build.txt