32-bit number is used to make 64-bit mask

Alex Cherepanov <[email protected]> Fri, 26 Dec 2008 00:06:42 -0500
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------070606090505080000070700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

MSVC 8 thinks that 32-bit type is unlikely to be suitable to make 64-nit
mask. I tend to agree but the owner's review is appreciated.

--------------070606090505080000070700
Content-Type: text/plain;
 name="gdevplnx.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gdevplnx.diff"

Index: gs/base/gdevplnx.c
===================================================================
--- gs/base/gdevplnx.c	(revision 9301)
+++ gs/base/gdevplnx.c	(working copy)
@@ -183,7 +183,7 @@
 		ppdc->colors.colored.c_base[i] = 0;
 		ppdc->colors.colored.c_level[i] = 0;
 	    }
-	ppdc->colors.colored.plane_mask &= 1 << plane;
+	ppdc->colors.colored.plane_mask &= (gx_color_index)1 << plane;
 	if (ppdc->colors.colored.c_level[plane] == 0) {
 	    gx_devn_reduce_colored_halftone(ppdc, (gx_device *)edev);
 	    ppdc->colors.pure = COLOR_PIXEL(edev, ppdc->colors.pure);

--------------070606090505080000070700
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review

--------------070606090505080000070700--