New Ghostscript/GhostPDL compiler warnings - 2019-04-23-06:31:28 - f0f2fa2a084758bcf99409ce19c2c1f93dc04d32

[email protected] Tue, 23 Apr 2019 12:35:12 -0700 (PDT)
Newsgroups gmane.comp.printing.ghostscript.regression
Message-ID <20190423193519.3C413204023E@i7>
Previous Revision: ba8ff34e302ec3e65bd47b14796dcfaef157527f
 Current Revision: f0f2fa2a084758bcf99409ce19c2c1f93dc04d32

commit f0f2fa2a084758bcf99409ce19c2c1f93dc04d32
Author:     Robin Watts <[email protected]>
AuthorDate: Tue Feb 19 16:38:26 2019 +0000
CommitDate: Tue Apr 23 12:40:40 2019 +0100

    Deep color transparency
    
    Previously, all transparency blending has been done using the
    pdf14 compisitor working in 8 bits. Here, we extend it to be
    capable of working in 16 bits.
    
    When the compositor is created, it looks at the underlying device;
    if that device uses more than 8 bits per component (plus 8 bits
    for tags, if tags are in use), then we use 'deep' (i.e. 16 bit
    per component) pdf14 buffers.

base/gdevdflt.c
base/gdevmem.c
base/gdevp14.c
base/gdevp14.h
base/gdevprn.c
base/gsptype1.c
base/gstrans.h
base/gxblend.c
base/gxblend.h
base/gxblend1.c
base/gxclrect.c
base/gxclthrd.c
base/gxcolor2.h
base/gxp1fill.c
base/gxpcolor.h



Ghostscript:

new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): 

./base/gxblend.c:2441:28: warning: comparison of constant 65535 with expression of type 'byte' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
        else if (src_shape == 65535) {
                 ~~~~~~~~~ ^  ~~~~~


http://miles.ghostscript.com:8080/artifex/f0f2fa2a084758bcf99409ce19c2c1f93dc04d32/gs-clang-warnings.txt



new scan-build warnings:

./base/gxblend.c:3704:35: warning: Dereference of null pointer
            int mask = mask_tr_fn[(*mask_curr_ptr++)>>8] * 0x101;
                                  ^~~~~~~~~~~~~~~~~~

./base/gxblend.c:3848:29: warning: Access to field 'rowstride' results in a dereference of a null pointer (loaded from variable 'maskbuf')
            mask_row_ptr += maskbuf->rowstride>>1;
                            ^~~~~~~~~~~~~~~~~~


http://miles.ghostscript.com:8080/artifex/f0f2fa2a084758bcf99409ce19c2c1f93dc04d32/gs/index.html

http://miles.ghostscript.com:8080/artifex/f0f2fa2a084758bcf99409ce19c2c1f93dc04d32/gs-scan-build.txt




GhostPCL:

new scan-build warnings:

./base/gxblend.c:3704:35: warning: Dereference of null pointer
            int mask = mask_tr_fn[(*mask_curr_ptr++)>>8] * 0x101;
                                  ^~~~~~~~~~~~~~~~~~

./base/gxblend.c:3848:29: warning: Access to field 'rowstride' results in a dereference of a null pointer (loaded from variable 'maskbuf')
            mask_row_ptr += maskbuf->rowstride>>1;
                            ^~~~~~~~~~~~~~~~~~


http://miles.ghostscript.com:8080/artifex/f0f2fa2a084758bcf99409ce19c2c1f93dc04d32/pcl/index.html

http://miles.ghostscript.com:8080/artifex/f0f2fa2a084758bcf99409ce19c2c1f93dc04d32/pcl-scan-build.txt