New Ghostscript/GhostPDL compiler warnings - 2018-08-09-18:30:03 - 8c0d309e74526e0eb5152af05067a9b0a53892c7
[email protected] Thu, 9 Aug 2018 19:51:52 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20180810025152.BEC74204081B@i7> |
Previous Revision: 40b7e425f7ba239e4639baf3feb9d54ebbb85957 Current Revision: 8c0d309e74526e0eb5152af05067a9b0a53892c7 commit 8c0d309e74526e0eb5152af05067a9b0a53892c7 Author: Ken Sharp <[email protected]> AuthorDate: Mon Jul 16 16:02:26 2018 +0100 CommitDate: Thu Aug 9 16:05:56 2018 +0100 pdfwrite - fix stored device pointers in streams, when subclassing Yet more evidence of nasty hackery in pdfwrite. It stores a copy of the device pointer in the pdf stream_state. Of course, if we had a subclassed device when we created the stream, and unsubclassed it before we closed the (eg if we create a high level pattern before the first marking operation) then the stored pointer was pointing at the wrong (child, freed) device. Just do some pointer traversal to make sure we store the top level one and use the bottom level one when we need it. devices/vector/gdevpdfo.c devices/vector/gdevpsds.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./devices/vector/gdevpdfo.c:2017:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./devices/vector/gdevpdfo.c:2017:20: warning: incompatible pointer types assigning to 'gx_device_pdf *' (aka 'struct gx_device_pdf_s *') from 'gx_device *' (aka 'struct gx_device_s *') [-Wincompatible-pointer-types] target_dev = target_dev->child; ^ ~~~~~~~~~~~~~~~~~ http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/gs-clang-warnings.txt new scan-build warnings: ./devices/vector/gdevpdfo.c:2017:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] target_dev = target_dev->child; ^ http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/gs/index.html http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/gs-scan-build.txt GhostPCL: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./devices/vector/gdevpdfo.c:2017:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/pcl-gcc-warnings.txt new scan-build warnings: ./devices/vector/gdevpdfo.c:2017:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] target_dev = target_dev->child; ^ http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/pcl/index.html http://miles.ghostscript.com:8080/artifex/8c0d309e74526e0eb5152af05067a9b0a53892c7/pcl-scan-build.txt