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

leonardo at ghostscript.com leonardo at ghostscript.com
Wed Jan 31 04:49:23 PST 2007


Author: leonardo
Date: 2007-01-31 04:49:22 -0800 (Wed, 31 Jan 2007)
New Revision: 7659

Modified:
   trunk/gs/src/gdevbit.c
   trunk/gs/src/gdevpdfm.c
   trunk/gs/src/gdevpdtc.c
   trunk/gs/src/gdevpsf2.c
   trunk/gs/src/gsdps1.c
   trunk/gs/src/gxclrast.c
   trunk/gs/src/gxhintn.c
   trunk/gs/src/gxpath.c
   trunk/gs/src/sjpx.c
   trunk/gs/src/ttcalc.c
   trunk/gs/src/ttinterp.c
   trunk/gs/src/vdtrace.h
Log:
Fix : Cygwin/gcc warnings.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gdevbit.c
===================================================================
--- trunk/gs/src/gdevbit.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gdevbit.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -303,7 +303,7 @@
         0 ,
         0,
         0,
-        { 0 }
+        0
     };
 
 static void

Modified: trunk/gs/src/gdevpdfm.c
===================================================================
--- trunk/gs/src/gdevpdfm.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gdevpdfm.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -761,7 +761,7 @@
     if (pnode->action != NULL)
 	pnode->action->id = pnode->id;
     else {
-	eprintf1("pdfmark error: Outline node %d has no action or destination.\n", pnode->id);
+	eprintf1("pdfmark error: Outline node %d has no action or destination.\n", (int)pnode->id);
 	code = gs_note_error(gs_error_undefined);
     }
     s = pdev->strm;

Modified: trunk/gs/src/gdevpdtc.c
===================================================================
--- trunk/gs/src/gdevpdtc.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gdevpdtc.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -361,7 +361,7 @@
 	    byte *glyph_usage;
 	    double *real_widths, *w, *v, *w0;
 	    int char_cache_size, width_cache_size;
-	    uint cid;
+	    gs_char cid;
 
 	    break_index = scan.index;
 	    break_xy_index = scan.xy_index;
@@ -483,7 +483,7 @@
 
 			memcpy(buf, subfont->font_name.chars, l);
 			buf[l] = 0;
-			eprintf2("Missing glyph CID=%d in the font %s . The output PDF may fail with some viewers.\n", cid, buf);
+			eprintf2("Missing glyph CID=%d in the font %s . The output PDF may fail with some viewers.\n", (int)cid, buf);
 			pdsubf->used[cid >> 3] |= 0x80 >> (cid & 7);
 		    }
 		    cid = 0, code = 1;  /* undefined glyph. */

Modified: trunk/gs/src/gdevpsf2.c
===================================================================
--- trunk/gs/src/gdevpsf2.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gdevpsf2.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -951,7 +951,6 @@
     gs_font_type1 *pfont = (gs_font_type1 *)pcw->pfont;
     byte used[255], index[255], supplement[256];
     int num_enc = min(pgsub->num_encoded, sizeof(index));
-    int num_enc_chars = pgsub->num_encoded_chars;
     int nsupp = 0;
     int j;
 
@@ -976,13 +975,16 @@
     sputc(s, (byte)(nsupp ? 0x80 : 0));
     sputc(s, (byte)num_enc);
 #ifdef DEBUG
-    if (nsupp != num_enc_chars - num_enc)
-	lprintf3("nsupp = %d, num_enc_chars = %d, num_enc = %d\n",
-		 nsupp, num_enc_chars, num_enc);
-    for (j = 0; j < num_enc; ++j)
-	if (!used[j])
-	    lprintf2("glyph %d = 0x%lx not used\n", j,
-		     pgsub->glyphs.subset_data[j + 1]);
+    {	int num_enc_chars = pgsub->num_encoded_chars;
+
+	if (nsupp != num_enc_chars - num_enc)
+	    lprintf3("nsupp = %d, num_enc_chars = %d, num_enc = %d\n",
+		     nsupp, num_enc_chars, num_enc);
+	for (j = 0; j < num_enc; ++j)
+	    if (!used[j])
+		lprintf2("glyph %d = 0x%lx not used\n", j,
+			 pgsub->glyphs.subset_data[j + 1]);
+    }
 #endif
     put_bytes(s, index, num_enc);
     if (nsupp) {

Modified: trunk/gs/src/gsdps1.c
===================================================================
--- trunk/gs/src/gsdps1.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gsdps1.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -93,7 +93,7 @@
 /* ------ Rectangles ------ */
 
 /* Append a list of rectangles to a path. */
-int
+private int
 gs_rectappend_compat(gs_state * pgs, const gs_rect * pr, uint count, bool clip)
 {
     extern bool CPSI_mode;

Modified: trunk/gs/src/gxclrast.c
===================================================================
--- trunk/gs/src/gxclrast.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gxclrast.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -2240,11 +2240,7 @@
 	case cmd_map_transfer_3:
 	    pmap = &pis->set_transfer.gray;
 	    *pcomp_num = &pis->set_transfer.gray_component_num;
-transfer1:  {
-		int i = map_index - cmd_map_transfer_0;
-
-	        if_debug1('L', " transfer[%d]", i);
-	    }
+transfer1:  if_debug1('L', " transfer[%d]", (int)(map_index - cmd_map_transfer_0));
 	    rc_unshare_struct(*pmap, gx_transfer_map, &st_transfer_map, mem,
 		return_error(gs_error_VMerror), "cmd_select_map(transfer)");
 	    map = *pmap;

Modified: trunk/gs/src/gxhintn.c
===================================================================
--- trunk/gs/src/gxhintn.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gxhintn.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -364,7 +364,7 @@
 
 private void t1_hinter__paint_glyph(t1_hinter * this, bool aligned)
 {
-#ifdef VD_TRACE
+#if VD_TRACE
 #define X(j) *member_prt(t1_glyph_space_coord, &this->pole[j], offset_x)
 #define Y(j) *member_prt(t1_glyph_space_coord, &this->pole[j], offset_y)
     t1_glyph_space_coord *p_x = (aligned ? &this->pole[0].ax : &this->pole[0].gx);
@@ -414,7 +414,7 @@
 
 private void  t1_hinter__paint_raster_grid(t1_hinter * this)
 {
-#ifdef VD_TRACE
+#if VD_TRACE
     int i;
     double j; /* 'long' can overflow */
     unsigned long c0 = RGB(192, 192, 192), c1 = RGB(64, 64, 64);

Modified: trunk/gs/src/gxpath.c
===================================================================
--- trunk/gs/src/gxpath.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/gxpath.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -1017,7 +1017,9 @@
 	case s_dash:{
     		const dash_segment *const pd = (const dash_segment *)pseg;
 
-		dprintf5("%s: %1.4f %1.4f %1.4f  %1.4f dash\n", out, pd->pt.x, pd->pt.y, pd->tangent.x, pd->tangent.y);
+		dprintf5("%s: %1.4f %1.4f %1.4f  %1.4f dash\n", out, 
+		    fixed2float(pd->pt.x), fixed2float(pd->pt.y), 
+		    fixed2float(pd->tangent.x), fixed2float(pd->tangent.y));
 		break;
 	    }
 	case s_line_close:{

Modified: trunk/gs/src/sjpx.c
===================================================================
--- trunk/gs/src/sjpx.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/sjpx.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -87,7 +87,7 @@
     if (image == NULL) return 1;
 
     if_debug2('w', "[w]JPX image is %d x %d\n",
-	jas_image_width(image), jas_image_height(image));
+	(int)jas_image_width(image), (int)jas_image_height(image));
 
     /* sort the colorspace */
     if jas_clrspc_isunknown(clrspc) csname = "unknown";
@@ -134,8 +134,8 @@
 	if_debug6('w', "[w]  component %d: type %d '%s%s' (%d bits%s)",
 	    i, type, name, opacity, jas_image_cmptprec(image, i), issigned);
 	if_debug4('w', " grid step (%d,%d) offset (%d,%d)\n",
-	    jas_image_cmpthstep(image, i), jas_image_cmptvstep(image, i),
-	    jas_image_cmpttlx(image, i), jas_image_cmpttly(image, i));
+	    (int)jas_image_cmpthstep(image, i), (int)jas_image_cmptvstep(image, i),
+	    (int)jas_image_cmpttlx(image, i), (int)jas_image_cmpttly(image, i));
     }
 
     return 0;

Modified: trunk/gs/src/ttcalc.c
===================================================================
--- trunk/gs/src/ttcalc.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/ttcalc.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -85,7 +85,7 @@
   }
 
 
-  Int  Order64( Int64  z )
+  private Int  Order64( Int64  z )
   {
     int  j = 0;
     while ( z )

Modified: trunk/gs/src/ttinterp.c
===================================================================
--- trunk/gs/src/ttinterp.c	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/ttinterp.c	2007-01-31 12:49:22 UTC (rev 7659)
@@ -630,6 +630,7 @@
   static void  Write_CVT( EXEC_OPS Int  index, TT_F26Dot6  value )
   {
     int ov=CUR.cvt[index];
+    (void)ov; /* Quiet compiler warning in release build. */
     CUR.cvt[index] = value;
     DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
 }
@@ -637,6 +638,7 @@
   static void  Write_CVT_Stretched( EXEC_OPS Int  index, TT_F26Dot6  value )
   {
     int ov=CUR.cvt[index];
+    (void)ov; /* Quiet compiler warning in release build. */
     CUR.cvt[index] = MulDiv_Round( value, 0x10000, CURRENT_Ratio() );
     DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
   }
@@ -645,6 +647,7 @@
   static void  Move_CVT( EXEC_OPS  Int index, TT_F26Dot6 value )
   {
     int ov=CUR.cvt[index];
+    (void)ov; /* Quiet compiler warning in release build. */
     CUR.cvt[index] += value;
     DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
   }
@@ -652,6 +655,7 @@
   static void  Move_CVT_Stretched( EXEC_OPS  Int index, TT_F26Dot6  value )
   {
     int ov=CUR.cvt[index];
+    (void)ov; /* Quiet compiler warning in release build. */
     CUR.cvt[index] += MulDiv_Round( value, 0x10000, CURRENT_Ratio() );
     DBG_PRINT3(" cvt[%d]%d:=%d", index, ov, CUR.cvt[index]);
   }
@@ -5117,6 +5121,8 @@
 	DBG_PRINT("\n%% *** Entering RunIns ***");
 #   endif
 
+    (void)dbg_prt; /* Quiet compiler warning in release build. */
+
     /* set CVT functions */
     CUR.metrics.ratio = 0;
     if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem )

Modified: trunk/gs/src/vdtrace.h
===================================================================
--- trunk/gs/src/vdtrace.h	2007-01-31 07:01:37 UTC (rev 7658)
+++ trunk/gs/src/vdtrace.h	2007-01-31 12:49:22 UTC (rev 7659)
@@ -32,7 +32,11 @@
 */
 
 #if !defined(VD_TRACE)
-#define VD_TRACE 1
+#   if defined(DEBUG)
+#	define VD_TRACE 1
+#   else
+#	define VD_TRACE 0
+#   endif
 #endif
 
 typedef struct vd_trace_host_s vd_trace_host;



More information about the gs-cvs mailing list