[gs-cvs] rev 7194 - trunk/gs/src

leonardo at ghostscript.com leonardo at ghostscript.com
Mon Nov 13 08:22:51 PST 2006


Author: leonardo
Date: 2006-11-13 08:22:51 -0800 (Mon, 13 Nov 2006)
New Revision: 7194

Modified:
   trunk/gs/src/gxshade6.c
Log:
Fix (shadings) : Remove colors from C stack, part 8.

DETAILS :

Fixing Cygwin/gcc warnings.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gxshade6.c
===================================================================
--- trunk/gs/src/gxshade6.c	2006-11-13 16:10:41 UTC (rev 7193)
+++ trunk/gs/src/gxshade6.c	2006-11-13 16:22:51 UTC (rev 7194)
@@ -1101,7 +1101,7 @@
 	return 1; /* Disable this check. */
     else {
 	const gs_direct_color_space *cs = 
-		    (gs_direct_color_space *)pfs->direct_space; /* break 'const'. */
+		    (const gs_direct_color_space *)pfs->direct_space; /* break 'const'. */
 	int code;
 	float smoothness = max(pfs->smoothness, 1.0 / min_linear_grades);
 	/* Restrict the smoothness with 1/min_linear_grades, because cs_is_linear
@@ -1164,7 +1164,6 @@
 	    gs_fill_attributes fa;
 	    gx_device_color dc[2];
 	    gs_fixed_rect clip;
-	    int code;
 
 	    clip = pfs->rect;
 	    if (swap_axes) {
@@ -1657,7 +1656,7 @@
 	return 2;
     if (!wedge) {
 	const gs_direct_color_space *cs = 
-		(gs_direct_color_space *)pfs->direct_space; /* break 'const'. */
+		(const gs_direct_color_space *)pfs->direct_space; /* break 'const'. */
 	float smoothness = max(pfs->smoothness, 1.0 / min_linear_grades);
 	/* Restrict the smoothness with 1/min_linear_grades, because cs_is_linear
 	   can't provide a better precision due to the color
@@ -2069,7 +2068,7 @@
     gs_fixed_edge le, re;
     fixed dx0, dy0, dx1, dy1;
     const shading_vertex_t *pp;
-    int i, code;
+    int i, code = 0;
     byte *color_stack_ptr = reserve_colors_inline(pfs, c, 2);
 
     if (color_stack_ptr == NULL)
@@ -2297,6 +2296,7 @@
     }
 }
 
+private int
 constant_color_quadrangle(patch_fill_state_t *pfs, const quadrangle_patch *p, bool self_intersecting)
 {
     patch_color_t *c[3];
@@ -3729,6 +3729,6 @@
 	code = fill_wedges(pfs, ku[3], kum, p.pole[3], 1, p.c[1][0], p.c[1][1], 
 		interpatch_padding | inpatch_wedge);
 out:
-    release_colors_inline(pfs, pfs->color_stack, 4);
+    release_colors_inline(pfs, color_stack_ptr, 4);
     return code;
 }



More information about the gs-cvs mailing list