New Ghostscript/GhostPDL compiler warnings - 2018-10-24-06:30:10 - be2c93dca70926069df25467a724eb787497c6f7
[email protected] Wed, 24 Oct 2018 10:34:27 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20181024173427.488282040569@i7> |
Previous Revision: 73f7c6eb92596087a1e30123ba0cdf701f8d6006 Current Revision: be2c93dca70926069df25467a724eb787497c6f7 commit be2c93dca70926069df25467a724eb787497c6f7 Author: Ken Sharp <[email protected]> AuthorDate: Wed Oct 24 13:46:14 2018 +0100 CommitDate: Wed Oct 24 14:06:49 2018 +0100 Allow cvrs to operate on 64-bit integers Bug #700011 "cvrs may truncate integers" zcvrs() cast the PostScript intval to an unsigned int internally, which truncates 64-bit values to 32-bit values. Other similar operators are capable of handling 64-bit values. This commit casts the result to a ps_uint (PostScript unsigned int) which varies in size depending on the platform. If a 64-bit integer data type is available it will be 64-bit otherwise it will be 32-bit. Additionally, check CPSI mode and if it is set, cast the ps_int to an unsigned int in order to explicitly truncate to a 32-bit value. We use CPSI compatibility mode in our internal testing, and if we don't do this then two of the Quality Logic CET files throw errors. Finally add some words to Use.htm regarding the word size of platforms and some of the implications regarding 64-bit values in PostScript. doc/Use.htm psi/ztype.c Ghostscript: new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): ./psi/ztype.c:388:13: warning: implicit declaration of function 'gs_currentcpsimode' [-Wimplicit-function-declaration] http://miles.ghostscript.com:8080/artifex/be2c93dca70926069df25467a724eb787497c6f7/gs-gcc-warnings.txt new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./psi/ztype.c:388:13: warning: implicit declaration of function 'gs_currentcpsimode' is invalid in C99 [-Wimplicit-function-declaration] if (gs_currentcpsimode(imemory)) { ^ http://miles.ghostscript.com:8080/artifex/be2c93dca70926069df25467a724eb787497c6f7/gs-clang-warnings.txt new scan-build warnings: ./psi/ztype.c:388:13: warning: implicit declaration of function 'gs_currentcpsimode' [-Wimplicit-function-declaration] if (gs_currentcpsimode(imemory)) { ^ http://miles.ghostscript.com:8080/artifex/be2c93dca70926069df25467a724eb787497c6f7/gs/index.html http://miles.ghostscript.com:8080/artifex/be2c93dca70926069df25467a724eb787497c6f7/gs-scan-build.txt