New Ghostscript/GhostPDL compiler warnings - 2018-08-09-20:00:03 - 2642d19883e4c008f999f2872cc0a37b2268634e
[email protected] Thu, 9 Aug 2018 21:22:17 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20180810042217.B97EB204081B@i7> |
Previous Revision: 8c0d309e74526e0eb5152af05067a9b0a53892c7 Current Revision: 2642d19883e4c008f999f2872cc0a37b2268634e commit 2642d19883e4c008f999f2872cc0a37b2268634e Author: Ken Sharp <[email protected]> AuthorDate: Tue Jul 17 10:08:33 2018 +0100 CommitDate: Thu Aug 9 16:05:56 2018 +0100 Fix the display device with subclassing devices When the display device is chosen, the executable calls display_set_callbacks on the current device. That code then sets a member in the current device, *without* checking the device is actually the display device. It does this *before* opening the device.... This is a quick hack to resolve the problem by descending to the bottom child device if there is a chain of devices in place. We should really check the device name at each step. In addition the Windows display device keeps a pointer to the device along with each 'image'. Not sure why, but it breaks if we are using device subclassing, because the device can change. Finally; the code doesn't cope with being unable to find a matching image with the same device. It sets the 'img' to NULL and then goes ahead and tries to use it anyway. Fix that at the same time so we don't crash! devices/gdevdsp.c psi/dwmain.c psi/idisp.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./devices/gdevdsp.c:1501:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./devices/gdevdsp.c:1501:21: warning: incompatible pointer types assigning to 'gx_device_display *' (aka 'struct gx_device_display_s *') from 'gx_device *' (aka 'struct gx_device_s *') [-Wincompatible-pointer-types] dev = dev->parent; ^ ~~~~~~~~~~~ http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/gs-clang-warnings.txt new scan-build warnings: ./devices/gdevdsp.c:1501:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] dev = dev->parent; ^ http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/gs/index.html http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/gs-scan-build.txt GhostPCL: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./devices/gdevdsp.c:1501:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/pcl-gcc-warnings.txt new scan-build warnings: ./devices/gdevdsp.c:1501:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] dev = dev->parent; ^ http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/pcl/index.html http://miles.ghostscript.com:8080/artifex/2642d19883e4c008f999f2872cc0a37b2268634e/pcl-scan-build.txt