New Ghostscript/GhostPDL compiler warnings - 2018-04-04-13:00:02 - 41e94a745cdbed112efc0e72d76645e8500a0791
[email protected] Wed, 4 Apr 2018 14:19:05 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20180404211905.45C062040265@i7> |
Previous Revision: 2870842d23f13413f3492f206cd12bb4144fc80d Current Revision: 41e94a745cdbed112efc0e72d76645e8500a0791 commit 41e94a745cdbed112efc0e72d76645e8500a0791 Author: Robin Watts <[email protected]> AuthorDate: Tue Apr 3 17:47:03 2018 +0100 CommitDate: Wed Apr 4 16:53:16 2018 +0100 Tweak logic for skipping clipped image lines. As gs runs through image data, it unpacks each line into a buffer, then checks whether that buffer is trivially outside the clipping region. If it is, then it doesn't bother to call the line renderer. This has 2 implications. Firstly, we unpack the line data even if it is to be skipped. Secondly, for line renderers that rely on counting the number of lines they have been passed (rather than on consulting the position of the dda) to know where they are, this can cause problems. Accordingly, this commit rejigs the code a bit. As well as a function pointer within penum that points to the rendering routine, we have a new function pointer that points to an optional "skip_render" routine. We also rejig the code so that we only unpack the data if we know it is going to be used. base/gxidata.c base/gximage.h base/gxipixel.c Ghostscript: new scan-build warnings: ./base/gxidata.c:296:12: warning: Called function pointer is null (null dereference) return (*penum->render)(penum, NULL, 0, width_spp, 0, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ http://miles.ghostscript.com:8080/artifex/41e94a745cdbed112efc0e72d76645e8500a0791/gs/index.html http://miles.ghostscript.com:8080/artifex/41e94a745cdbed112efc0e72d76645e8500a0791/gs-scan-build.txt new cppcheck warnings (Cppcheck 1.72): base/gxidata.c:91: error: Shifting a negative value is undefined behaviour base/gxidata.c:94: error: Shifting a negative value is undefined behaviour http://miles.ghostscript.com:8080/artifex/41e94a745cdbed112efc0e72d76645e8500a0791/gs-cppcheck.txt GhostPCL: new scan-build warnings: ./base/gxidata.c:296:12: warning: Called function pointer is null (null dereference) return (*penum->render)(penum, NULL, 0, width_spp, 0, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ http://miles.ghostscript.com:8080/artifex/41e94a745cdbed112efc0e72d76645e8500a0791/pcl/index.html http://miles.ghostscript.com:8080/artifex/41e94a745cdbed112efc0e72d76645e8500a0791/pcl-scan-build.txt