New Ghostscript/GhostPDL compiler warnings - 2018-08-28-12:30:05 - 21ae2f8d9953ffe8d6c8f1b2bf72a14b54d50e74

[email protected] Tue, 28 Aug 2018 14:20:35 -0700 (PDT)
Newsgroups gmane.comp.printing.ghostscript.regression
Message-ID <20180828212035.B7A0320401D4@i7>
Previous Revision: 7a702103b4490e370b36587c34b8b549a75ef3a5
 Current Revision: 21ae2f8d9953ffe8d6c8f1b2bf72a14b54d50e74

commit 21ae2f8d9953ffe8d6c8f1b2bf72a14b54d50e74
Author:     Chris Liddell <[email protected]>
AuthorDate: Tue Aug 28 14:53:49 2018 +0100
CommitDate: Tue Aug 28 14:53:49 2018 +0100

    Bug 699682: Handle text from single "gs_glyph" or "gs_char"
    
    In the FAPI code, when dealing a substituted cidfont, we extract the original
    character code, and decode that using the ToUnicode CMap, in order to get a
    Unicode code point we can then put through the TTF Unicode cmap table - thus
    improving the chances of getting a legible result.
    
    It failed to account for the possiblity that we were dealing with a single
    character code stored directly, rather than a string of 1 or more codes in a
    buffer - derefencing an invalid pointer.
    
    Add code to handle those cases.

psi/zfapi.c



Ghostscript:

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

./psi/zfapi.c:2286:43: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
                if (penum->text.operation && TEXT_FROM_SINGLE_CHAR) {
                                          ^  ~~~~~~~~~~~~~~~~~~~~~
./psi/zfapi.c:2286:43: note: use '&' for a bitwise operation
                if (penum->text.operation && TEXT_FROM_SINGLE_CHAR) {
                                          ^~
                                          &
./psi/zfapi.c:2286:43: note: remove constant to silence this warning
                if (penum->text.operation && TEXT_FROM_SINGLE_CHAR) {
                                         ~^~~~~~~~~~~~~~~~~~~~~~~~

./psi/zfapi.c:2288:50: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
                } else if (penum->text.operation && TEXT_FROM_SINGLE_GLYPH) {
                                                 ^  ~~~~~~~~~~~~~~~~~~~~~~
./psi/zfapi.c:2288:50: note: use '&' for a bitwise operation
                } else if (penum->text.operation && TEXT_FROM_SINGLE_GLYPH) {
                                                 ^~
                                                 &
./psi/zfapi.c:2288:50: note: remove constant to silence this warning
                } else if (penum->text.operation && TEXT_FROM_SINGLE_GLYPH) {
                                                ~^~~~~~~~~~~~~~~~~~~~~~~~~


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