New Ghostscript/GhostPDL compiler warnings - 2018-10-08-04:15:11 - 702f6982b63fca353d9106d2dbb6bb21f826c2e6
[email protected] Mon, 8 Oct 2018 05:34:34 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.regression |
|---|---|
| Message-ID | <20181008123434.9BB63204050A@i7> |
Previous Revision: a73071b87a61acf1237da5ad9da59bae9316fb8c Current Revision: 702f6982b63fca353d9106d2dbb6bb21f826c2e6 commit 702f6982b63fca353d9106d2dbb6bb21f826c2e6 Author: Robin Watts <[email protected]> AuthorDate: Wed Sep 26 20:42:32 2018 +0100 CommitDate: Mon Oct 8 12:03:56 2018 +0100 Bug 699800: Fix scan converter problem seen with barcodes. The new scan converter is incorrectly counting a pixel as being touched if a line moves horizontally across the bottom edge of that pixel. This means that paths (for example) carefully constructed to cover exactly a single pixel, such as: 0 0 moveto 1 0 lineto 1 1 lineto 0 1 lineto closepath fill (when rendered at 72dpi) will fill 2 pixels, rather than 1. The fix is rather more involved that you'd like, as we need to treat the cursor being on this vertical edge as a special case. We flush and "null" the cursor when we arrive on such an edge, and ignore horizontal motion across such edges. The identical fixes are required both for trap and rect filling. base/gxscanc.c Ghostscript: new clang warnings (clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)): ./base/gxscanc.c:1254:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr->right = min_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:135:36: note: expanded from macro 'min_int_in_fixed' #define min_int_in_fixed fixed2int(min_fixed) ^~~~~~~~~ ./base/gxfixed.h:32:20: note: expanded from macro 'min_fixed' # define min_fixed min_int ^~~~~~~ ./base/std.h:65:21: note: expanded from macro 'min_int' #define min_int (-1 << (ARCH_SIZEOF_INT * 8 - 1)) ~~ ^ ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:1255:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr->left = max_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:134:36: note: expanded from macro 'max_int_in_fixed' #define max_int_in_fixed fixed2int(max_fixed) ^~~~~~~~~ ./base/gxfixed.h:31:20: note: expanded from macro 'max_fixed' # define max_fixed max_int ^~~~~~~ ./base/std.h:66:19: note: expanded from macro 'max_int' #define max_int (~min_int) ^~~~~~~ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:1927:24: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr.left = max_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:134:36: note: expanded from macro 'max_int_in_fixed' #define max_int_in_fixed fixed2int(max_fixed) ^~~~~~~~~ ./base/gxfixed.h:31:20: note: expanded from macro 'max_fixed' # define max_fixed max_int ^~~~~~~ ./base/std.h:66:19: note: expanded from macro 'max_int' #define max_int (~min_int) ^~~~~~~ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:1928:24: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr.right = min_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:135:36: note: expanded from macro 'min_int_in_fixed' #define min_int_in_fixed fixed2int(min_fixed) ^~~~~~~~~ ./base/gxfixed.h:32:20: note: expanded from macro 'min_fixed' # define min_fixed min_int ^~~~~~~ ./base/std.h:65:21: note: expanded from macro 'min_int' #define min_int (-1 << (ARCH_SIZEOF_INT * 8 - 1)) ~~ ^ ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:3164:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr->right = min_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:135:36: note: expanded from macro 'min_int_in_fixed' #define min_int_in_fixed fixed2int(min_fixed) ^~~~~~~~~ ./base/gxfixed.h:32:20: note: expanded from macro 'min_fixed' # define min_fixed min_int ^~~~~~~ ./base/std.h:65:21: note: expanded from macro 'min_int' #define min_int (-1 << (ARCH_SIZEOF_INT * 8 - 1)) ~~ ^ ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:3165:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr->left = max_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:134:36: note: expanded from macro 'max_int_in_fixed' #define max_int_in_fixed fixed2int(max_fixed) ^~~~~~~~~ ./base/gxfixed.h:31:20: note: expanded from macro 'max_fixed' # define max_fixed max_int ^~~~~~~ ./base/std.h:66:19: note: expanded from macro 'max_int' #define max_int (~min_int) ^~~~~~~ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:3843:24: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr.left = max_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:134:36: note: expanded from macro 'max_int_in_fixed' #define max_int_in_fixed fixed2int(max_fixed) ^~~~~~~~~ ./base/gxfixed.h:31:20: note: expanded from macro 'max_fixed' # define max_fixed max_int ^~~~~~~ ./base/std.h:66:19: note: expanded from macro 'max_int' #define max_int (~min_int) ^~~~~~~ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ ./base/gxscanc.c:3844:24: warning: shifting a negative signed value is undefined [-Wshift-negative-value] cr.right = min_int_in_fixed; ^~~~~~~~~~~~~~~~ ./base/gxfixed.h:135:36: note: expanded from macro 'min_int_in_fixed' #define min_int_in_fixed fixed2int(min_fixed) ^~~~~~~~~ ./base/gxfixed.h:32:20: note: expanded from macro 'min_fixed' # define min_fixed min_int ^~~~~~~ ./base/std.h:65:21: note: expanded from macro 'min_int' #define min_int (-1 << (ARCH_SIZEOF_INT * 8 - 1)) ~~ ^ ./base/gxfixed.h:86:42: note: expanded from macro 'fixed2int' #define fixed2int(x) ((int)_fixed_rshift(x)) ^ ./base/gxfixed.h:53:39: note: expanded from macro '_fixed_rshift' #define _fixed_rshift(x) arith_rshift(x,_fixed_shift) ^ ./base/std.h:102:31: note: expanded from macro 'arith_rshift' # define arith_rshift(x,n) ((x) >> (n)) ^ http://miles.ghostscript.com:8080/artifex/702f6982b63fca353d9106d2dbb6bb21f826c2e6/gs-clang-warnings.txt