New Ghostscript/GhostPDL compiler warnings - 2018-11-27-19:45:02 - c80766f966d2801a8608e72a1dea6dcb4bec4248

[email protected] Tue, 27 Nov 2018 21:01:52 -0800 (PST)
Newsgroups gmane.comp.printing.ghostscript.regression
Message-ID <20181128050152.EEFC32040473@i7>
Previous Revision: 779664d79f0dca77dbdd66b753679bfd12dcbbad
 Current Revision: c80766f966d2801a8608e72a1dea6dcb4bec4248

commit c80766f966d2801a8608e72a1dea6dcb4bec4248
Author:     Robin Watts <[email protected]>
AuthorDate: Tue Nov 27 17:24:38 2018 +0000
CommitDate: Tue Nov 27 17:36:28 2018 +0000

    Bug 700278: Fix inverted colors in jpegcmyk output.
    
    It seems that in the transform pixel region code, I know that
    colours are in the right space, and therefore assume that there
    will be a 1:1 mapping from the raw bytes into the device memory.
    
    Sadly the jpegcmyk device inverts everything, so my assumption
    was wrong.
    
    Accordingly I've added a gxdso to tell me if the encoding is
    direct. I've added this to the obvious devices - more may be
    required in future.
    
    If this is unimplemented, then we'll take the slower route
    and look up colors.

base/gdevdflt.c
base/gdevp14.c
base/gxcmap.c
base/gxdevsop.h
devices/gdevbit.c



Ghostscript:

new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): 

./base/gdevdflt.c:1056:44: warning: comparison between pointer and integer
./devices/gdevbit.c:891:40: warning: comparison between pointer and integer

http://miles.ghostscript.com:8080/artifex/c80766f966d2801a8608e72a1dea6dcb4bec4248/gs-gcc-warnings.txt



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

./base/gdevdflt.c:1056:44: warning: comparison between pointer and integer ('byte *' (aka 'unsigned char *') and 'int')
            if (pdev->color_info.comp_bits != 8)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~

./devices/gdevbit.c:891:40: warning: comparison between pointer and integer ('byte *' (aka 'unsigned char *') and 'int')
        if (pdev->color_info.comp_bits != 8)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~


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



new scan-build warnings:

./base/gdevdflt.c:1056:44: warning: comparison between pointer and integer
             if (pdev->color_info.comp_bits != 8)
                                            ^

./devices/gdevbit.c:891:40: warning: comparison between pointer and integer
         if (pdev->color_info.comp_bits != 8)
                                        ^


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

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




GhostPCL:

new gcc warnings (gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609): 

./base/gdevdflt.c:1056:44: warning: comparison between pointer and integer
./devices/gdevbit.c:891:40: warning: comparison between pointer and integer

http://miles.ghostscript.com:8080/artifex/c80766f966d2801a8608e72a1dea6dcb4bec4248/pcl-gcc-warnings.txt



new scan-build warnings:

./base/gdevdflt.c:1056:44: warning: comparison between pointer and integer
             if (pdev->color_info.comp_bits != 8)
                                            ^

./devices/gdevbit.c:891:40: warning: comparison between pointer and integer
         if (pdev->color_info.comp_bits != 8)
                                        ^


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

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