Re: Fix : Cygwin/gcc compiler claimed possiblyuninitialized variables.

"Igor V. Melichev" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Attaching an improved patch.
The old one is wrong in gxfill.c .

Igor.

----- Original Message ----- 
From: "Igor V. Melichev" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 25, 2003 2:19 PM
Subject: [gs-code-review] Fix : Cygwin/gcc compiler claimed
possiblyuninitialized variables.


> NOTE : this patch modifies a file affected by
>
http://www.ghostscript.com/pipermail/gs-code-review/2003-November/004255.html
> Alex, please account it.
>
> [Log message beg]
> Fix : Cygwin/gcc compiler claimed possibly uninitialized variables.
>
> DETAILS :
>
> This doesn't include jbig2dec warnings.
>
> EXPECTED DIFFERENCES :
>
> If a difference appears, it should be considered as a bug in the old code.
> [Log message end]
>
>


----------------------------------------------------------------------------
----


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

_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
patch.txt (text/plain, 22.7 KB)
Changes: 
 
 
 
*** f:\casper\HEAD\gs\src\gdevdevn.c	Wed Oct  8 00:06:30 2003
--- files\gs\src\gdevdevn.c	Tue Nov 25 14:56:38 2003
***************
*** 417,421 ****
      int i, code = 0;
      int first_bit;
!     int pcmlinelength, linelength[GX_DEVICE_COLOR_MAX_COMPONENTS];
      byte *data;
      char spotname[gp_file_name_sizeof];
--- 417,422 ----
      int i, code = 0;
      int first_bit;
!     int pcmlinelength = 0; /* Initialize against indeterminizm in case of pdev->height == 0. */
!     int linelength[GX_DEVICE_COLOR_MAX_COMPONENTS];
      byte *data;
      char spotname[gp_file_name_sizeof];
***************
*** 1002,1006 ****
  setup_pcx_header(gx_device_printer * pdev, pcx_header * phdr, int num_planes, int bits_per_plane)
  {
!     bool planar;
   
      *phdr = pcx_header_prototype;
--- 1003,1007 ----
  setup_pcx_header(gx_device_printer * pdev, pcx_header * phdr, int num_planes, int bits_per_plane)
  {
!     bool planar = true; /* Invalid cases could cause an indeterminizm. */
   
      *phdr = pcx_header_prototype;
 
 
 
*** f:\casper\HEAD\gs\src\gdevp14.c	Tue Aug 19 14:32:52 2003
--- files\gs\src\gdevp14.c	Tue Nov 25 14:56:42 2003
***************
*** 514,518 ****
      pdf14_buf *tos = ctx->stack;
      pdf14_buf *nos = tos->saved;
!     pdf14_buf *maskbuf = ctx->maskbuf;
      int n_chan = ctx->n_chan;
      byte alpha = tos->alpha;
--- 514,518 ----
      pdf14_buf *tos = ctx->stack;
      pdf14_buf *nos = tos->saved;
!     const pdf14_buf *maskbuf = ctx->maskbuf;
      int n_chan = ctx->n_chan;
      byte alpha = tos->alpha;
***************
*** 529,534 ****
      int tos_planestride = tos->planestride;
      int nos_planestride = nos->planestride;
!     int mask_planestride;
!     byte mask_bg_alpha;
      int width = x1 - x0;
      int x, y;
--- 529,534 ----
      int tos_planestride = tos->planestride;
      int nos_planestride = nos->planestride;
!     int mask_planestride = 0x0badf00d; /* Quiet compiler. */
!     byte mask_bg_alpha = 0; /* Quiet compiler. */
      int width = x1 - x0;
      int x, y;
***************
*** 544,548 ****
      int nos_shape_offset = n_chan * nos_planestride;
      bool nos_has_shape = nos->has_shape;
!     byte *mask_tr_fn;
  
      if (nos == NULL)
--- 544,548 ----
      int nos_shape_offset = n_chan * nos_planestride;
      bool nos_has_shape = nos->has_shape;
!     byte *mask_tr_fn = NULL; /* Quiet compiler. */
  
      if (nos == NULL)
***************
*** 572,576 ****
  	    }
  
! 	    if (mask_ptr != NULL) {
  		int mask_alpha = mask_ptr[x + 3 * mask_planestride];
  		int tmp;
--- 572,576 ----
  	    }
  
! 	    if (maskbuf != NULL) {
  		int mask_alpha = mask_ptr[x + 3 * mask_planestride];
  		int tmp;
***************
*** 630,634 ****
  	if (nos_alpha_g_ptr != NULL)
  	    nos_alpha_g_ptr += nos->rowstride - width;
! 	if (mask_ptr != NULL)
  	    mask_ptr += maskbuf->rowstride;
      }
--- 630,634 ----
  	if (nos_alpha_g_ptr != NULL)
  	    nos_alpha_g_ptr += nos->rowstride - width;
! 	if (maskbuf != NULL)
  	    mask_ptr += maskbuf->rowstride;
      }
***************
*** 638,642 ****
      pdf14_buf_free(tos, ctx->memory);
      if (maskbuf != NULL) {
! 	pdf14_buf_free(maskbuf, ctx->memory);
  	ctx->maskbuf = NULL;
      }
--- 638,642 ----
      pdf14_buf_free(tos, ctx->memory);
      if (maskbuf != NULL) {
! 	pdf14_buf_free(ctx->maskbuf, ctx->memory);
  	ctx->maskbuf = NULL;
      }
***************
*** 1240,1247 ****
      int planestride = buf->planestride;
      bool has_alpha_g = buf->has_alpha_g;
!     bool has_shape = buf->has_shape;
      int shape_off = buf->n_chan * planestride;
      int alpha_g_off = shape_off + (has_shape ? planestride : 0);
!     byte shape;
  
      src[0] = color >> 16;
--- 1240,1247 ----
      int planestride = buf->planestride;
      bool has_alpha_g = buf->has_alpha_g;
!     const bool has_shape = buf->has_shape;
      int shape_off = buf->n_chan * planestride;
      int alpha_g_off = shape_off + (has_shape ? planestride : 0);
!     byte shape = 0; /* Quiet compiler. */
  
      src[0] = color >> 16;
 
 
 
*** f:\casper\HEAD\gs\src\gdevpdfm.c	Tue Nov 11 15:29:35 2003
--- files\gs\src\gdevpdfm.c	Tue Nov 25 14:56:45 2003
***************
*** 1269,1272 ****
--- 1269,1274 ----
  	byte *str = 0;
  
+ 	vsize = 0x0badf00d; /* Quiet compiler. */
+ 
  	if (pdf_key_eq(pairs + i, "/Producer")) {
  	    /*
 
 
 
*** f:\casper\HEAD\gs\src\gdevpdtc.c	Wed Oct 22 17:11:27 2003
--- files\gs\src\gdevpdtc.c	Tue Nov 25 14:56:48 2003
***************
*** 51,55 ****
      const gs_matrix *psmat = 0;
      gs_font *prev_font = 0;
!     gs_char chr, char_code, space_char = ~0;
      int buf_index = 0;
      bool return_width = (penum->text.operation & TEXT_RETURN_WIDTH);
--- 51,55 ----
      const gs_matrix *psmat = 0;
      gs_font *prev_font = 0;
!     gs_char chr, char_code = 0x0badf00d, space_char = ~0;
      int buf_index = 0;
      bool return_width = (penum->text.operation & TEXT_RETURN_WIDTH);
***************
*** 309,322 ****
      pdf_font_resource_t *pdsubf0 = NULL;
      gs_font *subfont0 = NULL;
!     uint index = scan.index, xy_index = scan.xy_index, font_index0;
      bool done = false;
  
      pte->returned.total_width.x = pte->returned.total_width.y = 0;;
      for (;;) {
! 	uint break_index, break_xy_index, font_index;
  	gs_const_string str;
  	pdf_text_process_state_t text_state;
  	pdf_font_resource_t *pdsubf;
! 	gs_font *subfont;
  	gs_point wxy;
  	bool font_change;
--- 309,324 ----
      pdf_font_resource_t *pdsubf0 = NULL;
      gs_font *subfont0 = NULL;
!     uint index = scan.index, xy_index = scan.xy_index;
!     uint font_index0 = 0x7badf00d;
      bool done = false;
  
      pte->returned.total_width.x = pte->returned.total_width.y = 0;;
      for (;;) {
! 	uint break_index, break_xy_index;
! 	uint font_index = 0x7badf00d;
  	gs_const_string str;
  	pdf_text_process_state_t text_state;
  	pdf_font_resource_t *pdsubf;
! 	gs_font *subfont = NULL;
  	gs_point wxy;
  	bool font_change;
 
 
 
*** f:\casper\HEAD\gs\src\gdevpdtf.c	Tue Jul  8 17:26:39 2003
--- files\gs\src\gdevpdtf.c	Tue Nov 25 14:56:51 2003
***************
*** 572,576 ****
      uint size = fn->size;
      int index = pdf_find_standard_font_name(chars, size);
!     bool embed_as_standard_called = false, do_embed_as_standard;
  
      /*
--- 572,577 ----
      uint size = fn->size;
      int index = pdf_find_standard_font_name(chars, size);
!     bool embed_as_standard_called = false;
!     bool do_embed_as_standard = false; /* Quiet compiler. */
  
      /*
 
 
 
*** f:\casper\HEAD\gs\src\gdevpdtt.c	Thu Oct 23 13:49:31 2003
--- files\gs\src\gdevpdtt.c	Tue Nov 25 14:56:53 2003
***************
*** 248,252 ****
  	    const gs_text_params_t *text)
  {
!     bool new_clip;
      int code;
  
--- 248,252 ----
  	    const gs_text_params_t *text)
  {
!     bool new_clip = false; /* Quiet compiler. */
      int code;
  
 
 
 
*** f:\casper\HEAD\gs\src\gdevplnx.c	Tue Aug 19 14:32:57 2003
--- files\gs\src\gdevplnx.c	Tue Nov 25 14:56:56 2003
***************
*** 732,738 ****
      long tbuf[COPY_ROP_TEXTURE_BUF_SIZE / sizeof(long)];
      const byte *plane_source;
!     uint plane_raster;
      gx_strip_bitmap plane_texture;
!     const gx_strip_bitmap *plane_textures;
      int code;
  
--- 732,738 ----
      long tbuf[COPY_ROP_TEXTURE_BUF_SIZE / sizeof(long)];
      const byte *plane_source;
!     uint plane_raster = 0xbaadf00d; /* Initialize against indeterminizm. */
      gx_strip_bitmap plane_texture;
!     const gx_strip_bitmap *plane_textures = NULL;
      int code;
  
 
 
 
*** f:\casper\HEAD\gs\src\gdevprn.c	Tue Feb 25 16:09:46 2003
--- files\gs\src\gdevprn.c	Tue Nov 25 14:56:59 2003
***************
*** 221,227 ****
      byte *the_memory = 0;
      gdev_prn_space_params save_params;
!     int save_width, save_height;
!     bool is_command_list;
!     bool save_is_command_list;
      int ecode = 0;
      int pass;
--- 221,228 ----
      byte *the_memory = 0;
      gdev_prn_space_params save_params;
!     int save_width = 0x0badf00d; /* Quiet compiler */
!     int save_height = 0x0badf00d; /* Quiet compiler */
!     bool is_command_list = false; /* Quiet compiler */
!     bool save_is_command_list = false; /* Quiet compiler */
      int ecode = 0;
      int pass;
 
 
 
*** f:\casper\HEAD\gs\src\gdevps.c	Tue Oct 21 19:06:46 2003
--- files\gs\src\gdevps.c	Tue Nov 25 14:57:01 2003
***************
*** 1402,1406 ****
      const gs_color_space *pcs = pim->ColorSpace;
      const gs_color_space *pbcs = pcs;
!     const char *base_name;
      gs_color_space_index index;
      int num_components;
--- 1402,1406 ----
      const gs_color_space *pcs = pim->ColorSpace;
      const gs_color_space *pbcs = pcs;
!     const char *base_name = NULL;
      gs_color_space_index index;
      int num_components;
 
 
 
*** f:\casper\HEAD\gs\src\gpmisc.c	Thu Apr 17 14:52:31 2003
--- files\gs\src\gpmisc.c	Tue Nov 25 14:57:04 2003
***************
*** 334,338 ****
  {
      uint plen = gp_file_name_root(fname, flen), slen;
!     const char *ip, *ipe, *item;
  
      if (plen > 0)
--- 334,339 ----
  {
      uint plen = gp_file_name_root(fname, flen), slen;
!     const char *ip, *ipe; 
!     const char *item = fname; /* plen == flen could cause an indeterminizm. */
  
      if (plen > 0)
 
 
 
*** f:\casper\HEAD\gs\src\gsalloc.c	Mon Feb 24 22:59:21 2003
--- files\gs\src\gsalloc.c	Tue Nov 25 14:57:08 2003
***************
*** 1073,1077 ****
  	aligned_min_size + obj_align_round(aligned_min_size / 8);
      obj_header_t *best_fit = 0;
!     obj_header_t **best_fit_prev;
      uint best_fit_size = max_uint;
      obj_header_t *pfree;
--- 1073,1077 ----
  	aligned_min_size + obj_align_round(aligned_min_size / 8);
      obj_header_t *best_fit = 0;
!     obj_header_t **best_fit_prev = NULL; /* Initialize against indeteminizm. */
      uint best_fit_size = max_uint;
      obj_header_t *pfree;
 
 
 
*** f:\casper\HEAD\gs\src\gscie.c	Sun Jun 16 09:48:55 2002
--- files\gs\src\gscie.c	Tue Nov 25 14:57:11 2003
***************
*** 655,668 ****
      /* Iterate over output components. */
      for (j = 0; j < 3; ++j) {
- 	cie_cached_value rmin, rmax;
- 
  	/* Iterate over sub-caches. */
- 	for (k = 0; k < 3; ++k) {
  	    cie_interpolation_range_t *p =
! 		&pvc->caches[k].vecs.params.interpolation_ranges[j];
  
! 	    if (k == 0)
! 		rmin = p->rmin, rmax = p->rmax;
! 	    else
  		rmin = min(rmin, p->rmin), rmax = max(rmax, p->rmax);
  	}
--- 655,665 ----
      /* Iterate over output components. */
      for (j = 0; j < 3; ++j) {
  	/* Iterate over sub-caches. */
  	cie_interpolation_range_t *p = 
! 		&pvc->caches[0].vecs.params.interpolation_ranges[j];
!         cie_cached_value rmin = p->rmin, rmax = p->rmax;
  
! 	for (k = 1; k < 3; ++k) {
! 	    p = &pvc->caches[k].vecs.params.interpolation_ranges[j];
  	    rmin = min(rmin, p->rmin), rmax = max(rmax, p->rmax);
  	}
 
 
 
*** f:\casper\HEAD\gs\src\gsfont.c	Mon Nov 17 19:42:48 2003
--- files\gs\src\gsfont.c	Tue Nov 25 14:57:13 2003
***************
*** 742,746 ****
  	gs_glyph glyph;
  	int fixed_width = 0;
! 	int index, code;
  
  	for (index = 0;
--- 742,747 ----
  	gs_glyph glyph;
  	int fixed_width = 0;
! 	int index;
! 	int code = 0; /* Quiet compiler. */
  
  	for (index = 0;
 
 
 
*** f:\casper\HEAD\gs\src\gxclpath.c	Tue Sep 30 13:34:21 2003
--- files\gs\src\gxclpath.c	Tue Nov 25 14:57:17 2003
***************
*** 1045,1049 ****
       */
      gs_fixed_point start;
!     int start_side;
  
      /*
--- 1045,1049 ----
       */
      gs_fixed_point start;
!     int start_side = 0x7badf00d; /* Initialize against indeterminizm. */
  
      /*
***************
*** 1051,1058 ****
       * following the moveto:
       */
!     bool start_skip;
  
      /* The side of the last point: */
!     int side;
  
      /* The last point with side != 0: */
--- 1051,1058 ----
       * following the moveto:
       */
!     bool start_skip = 0x7badf00d; /* Initialize against indeterminizm. */
  
      /* The side of the last point: */
!     int side = 0x7badf00d; /* Initialize against indeterminizm. */
  
      /* The last point with side != 0: */
***************
*** 1061,1065 ****
      /* If the last out-going segment was a lineto, */
      /* its notes: */
!     segment_notes out_notes;
  
      /*
--- 1061,1065 ----
      /* If the last out-going segment was a lineto, */
      /* its notes: */
!     segment_notes out_notes = 0x7badf00d; /* Initialize against indeterminizm. */
  
      /*
 
 
 
*** f:\casper\HEAD\gs\src\gxclrast.c	Sat Nov  2 20:49:08 2002
--- files\gs\src\gxclrast.c	Tue Nov 25 14:57:19 2003
***************
*** 364,369 ****
      while (code >= 0) {
  	int op;
! 	int compress, depth, raster;
! 	byte *source;
  	gx_color_index colors[2];
  	gx_color_index *pcolor;
--- 364,371 ----
      while (code >= 0) {
  	int op;
! 	int compress;
! 	int depth = 0x7badf00d; /* Initialize against indeterminizm. */
! 	int raster = 0x7badf00d; /* Initialize against indeterminizm. */
! 	byte *source = NULL;  /* Initialize against indeterminizm. */
  	gx_color_index colors[2];
  	gx_color_index *pcolor;
***************
*** 1060,1064 ****
  			    uint flags;
  			    int plane;
! 			    uint raster;
  
  			    cmd_getw(flags, cbp);
--- 1062,1066 ----
  			    uint flags;
  			    int plane;
! 			    uint raster1 = 0xbaadf00d; /* Initialize against indeterminizm. */
  
  			    cmd_getw(flags, cbp);
***************
*** 1072,1079 ****
  					cbp = top_up_cbuf(&cbuf, cbp);
  				    cmd_getw(planes[plane].raster, cbp);
! 				    if ((raster = planes[plane].raster) != 0)
  					cmd_getw(data_x, cbp);
  				} else {
! 				    planes[plane].raster = raster;
  				}
  				planes[plane].data_x = data_x;
--- 1074,1081 ----
  					cbp = top_up_cbuf(&cbuf, cbp);
  				    cmd_getw(planes[plane].raster, cbp);
! 				    if ((raster1 = planes[plane].raster) != 0)
  					cmd_getw(data_x, cbp);
  				} else {
! 				    planes[plane].raster = raster1;
  				}
  				planes[plane].data_x = data_x;
 
 
 
*** f:\casper\HEAD\gs\src\gxfcopy.c	Tue Oct 21 05:43:28 2003
--- files\gs\src\gxfcopy.c	Tue Nov 25 14:57:24 2003
***************
*** 699,703 ****
       * separately from outline data. We could skip it for Type 1, which doesn't.
       */
!     int i, WMode = ofont->WMode, code;
      int members = (GLYPH_INFO_WIDTH0 << WMode) | GLYPH_INFO_OUTLINE_WIDTHS | GLYPH_INFO_NUM_PIECES;
      gs_matrix mat;
--- 699,703 ----
       * separately from outline data. We could skip it for Type 1, which doesn't.
       */
!     int i, WMode = ofont->WMode;
      int members = (GLYPH_INFO_WIDTH0 << WMode) | GLYPH_INFO_OUTLINE_WIDTHS | GLYPH_INFO_NUM_PIECES;
      gs_matrix mat;
***************
*** 714,718 ****
  	int code0 = ofont->procs.glyph_info((gs_font *)ofont, glyph, &mat, members, &info0);
  	int code1 = cfont->procs.glyph_info((gs_font *)cfont, glyph, &mat, members, &info1);
! 	int code2;
  
  	if (code0 == gs_error_undefined || code1 == gs_error_undefined)
--- 714,718 ----
  	int code0 = ofont->procs.glyph_info((gs_font *)ofont, glyph, &mat, members, &info0);
  	int code1 = cfont->procs.glyph_info((gs_font *)cfont, glyph, &mat, members, &info1);
! 	int code2, code;
  
  	if (code0 == gs_error_undefined || code1 == gs_error_undefined)
***************
*** 748,752 ****
  		if (!code2)
  		    code = compare_glyphs(cfont, ofont, pieces, info0.num_pieces, level + 1);
! 	    }
  	    if (pieces != pieces0)
  		gs_free_object(cfont->memory, pieces, "compare_glyphs");
--- 748,755 ----
  		if (!code2)
  		    code = compare_glyphs(cfont, ofont, pieces, info0.num_pieces, level + 1);
! 		else
! 		    code = 0; /* Quiet compiler. */
! 	    } else
! 		code2 = code = 0;
  	    if (pieces != pieces0)
  		gs_free_object(cfont->memory, pieces, "compare_glyphs");
 
 
 
*** f:\casper\HEAD\gs\src\gxfill.c	Tue Nov 25 11:34:07 2003
--- files\gs\src\gxfill.c	Tue Nov 25 15:09:18 2003
***************
*** 696,700 ****
  	segment *plast = psub->last;
  	int dir = 2;		/* hack to skip first segment */
! 	int first_dir, prev_dir;
  	segment *prev;
  
--- 696,701 ----
  	segment *plast = psub->last;
  	int dir = 2;		/* hack to skip first segment */
! 	int first_dir = 2; /* Quiet compiler. */
! 	int prev_dir;
  	segment *prev;
  
***************
*** 1474,1478 ****
  {
      fixed x = min_fixed, y1 = *y_top;
!     active_line *alp, *stopx = NULL, *endp;
  
      /* don't bother if no pixels with no pseudo_rasterization */
--- 1475,1480 ----
  {
      fixed x = min_fixed, y1 = *y_top;
!     active_line *alp, *stopx = NULL;
!     active_line *endp = NULL;
  
      /* don't bother if no pixels with no pseudo_rasterization */
***************
*** 1656,1660 ****
  #	    endif
  	    ) {
! 	    fixed xlbot, xltop; /* as of last "outside" line */
  	    int inside = 0;
  	    active_line *flp;
--- 1658,1662 ----
  #	    endif
  	    ) {
! 	    fixed xlbot = 0xbaadf00d, xltop = 0xbaadf00d; /* as of last "outside" line */
  	    int inside = 0;
  	    active_line *flp;
 
 
 
*** f:\casper\HEAD\gs\src\gximono.c	Wed Mar 26 14:54:08 2003
--- files\gs\src\gximono.c	Tue Nov 25 14:57:29 2003
***************
*** 92,97 ****
      gs_logical_operation_t lop = penum->log_op;
      const bool masked = penum->masked;
!     const gs_color_space *pcs;	/* only set for non-masks */
!     cs_proc_remap_color((*remap_color));	/* ditto */
      gs_client_color cc;
      gx_device_color *pdevc = &penum->icolor1;	/* color for masking */
--- 92,97 ----
      gs_logical_operation_t lop = penum->log_op;
      const bool masked = penum->masked;
!     const gs_color_space *pcs = NULL;	/* only set for non-masks */
!     cs_proc_remap_color((*remap_color)) = NULL;	/* ditto */
      gs_client_color cc;
      gx_device_color *pdevc = &penum->icolor1;	/* color for masking */
 
 
 
*** f:\casper\HEAD\gs\src\gxstroke.c	Tue Sep  2 14:57:15 2003
--- files\gs\src\gxstroke.c	Tue Nov 25 14:57:31 2003
***************
*** 302,306 ****
       * See the note in stroke_add for the algorithm.
       */
!     int uniform;
      bool reflected;
      orientation orient =
--- 302,306 ----
       * See the note in stroke_add for the algorithm.
       */
!     int uniform0;
      bool reflected;
      orientation orient =
***************
*** 308,324 ****
  #ifdef OPTIMIZE_ORIENTATION
  	 is_fzero2(xy, yx) ?
! 	 (uniform = (xx == yy ? 1 : xx == -yy ? -1 : 0),
! 	  reflected = (uniform ? uniform < 0 : (xx < 0) != (yy < 0)),
  	  orient_portrait) :
  	 is_fzero2(xx, yy) ?
! 	 (uniform = (xy == yx ? -1 : xy == -yx ? 1 : 0),
! 	  reflected = (uniform ? uniform < 0 : (xy < 0) == (yx < 0)),
  	  orient_landscape) :
      /* We should optimize uniform rotated coordinate systems */
      /* here as well, but we don't. */
  #endif
! 	 (uniform = 0,
  	  reflected = xy * yx > xx * yy,
  	  orient_other));
      /*
       * Formerly, there was a hack here that only treated the joins of
--- 308,325 ----
  #ifdef OPTIMIZE_ORIENTATION
  	 is_fzero2(xy, yx) ?
! 	 (uniform0 = (xx == yy ? 1 : xx == -yy ? -1 : 0),
! 	  reflected = (uniform0 ? uniform0 < 0 : (xx < 0) != (yy < 0)),
  	  orient_portrait) :
  	 is_fzero2(xx, yy) ?
! 	 (uniform0 = (xy == yx ? -1 : xy == -yx ? 1 : 0),
! 	  reflected = (uniform0 ? uniform0 < 0 : (xy < 0) == (yx < 0)),
  	  orient_landscape) :
      /* We should optimize uniform rotated coordinate systems */
      /* here as well, but we don't. */
  #endif
! 	 (uniform0 = 0,
  	  reflected = xy * yx > xx * yy,
  	  orient_other));
+     const int uniform = uniform0;
      /*
       * Formerly, there was a hack here that only treated the joins of
***************
*** 339,343 ****
      float line_width = pgs_lp->half_width;	/* (*half* the line width) */
      bool always_thin;
!     double line_width_and_scale, device_line_width_scale;
      double device_dot_length = pgs_lp->dot_length * fixed_1;
      const subpath *psub;
--- 340,345 ----
      float line_width = pgs_lp->half_width;	/* (*half* the line width) */
      bool always_thin;
!     double line_width_and_scale;
!     double device_line_width_scale = 0; /* Quiet compiler. */
      double device_dot_length = pgs_lp->dot_length * fixed_1;
      const subpath *psub;
 
 
 
*** f:\casper\HEAD\gs\src\iscan.c	Tue Oct 21 11:50:13 2003
--- files\gs\src\iscan.c	Tue Nov 25 14:57:34 2003
***************
*** 444,447 ****
--- 444,448 ----
  #define try_number sstate.s_ss.s_name.s_try_number
  
+     sptr = endptr = NULL; /* Quiet compiler */
      if (pstate->s_pstack != 0) {
  	if_not_spush1()
 
 
 
*** f:\casper\HEAD\gs\src\ttfmain.c	Tue Oct 14 16:53:51 2003
--- files\gs\src\ttfmain.c	Tue Nov 25 14:57:36 2003
***************
*** 241,245 ****
      r->Read(r, sVersion, 4);
      if(!memcmp(sVersion, "ttcf", 4)) {
! 	unsigned int nFonts, nPos;
  
  	r->Read(r, sVersion, 4);
--- 241,246 ----
      r->Read(r, sVersion, 4);
      if(!memcmp(sVersion, "ttcf", 4)) {
! 	unsigned int nFonts;
! 	unsigned int nPos = 0xbaadf00d; /* Quiet compiler. */
  
  	r->Read(r, sVersion, 4);
***************
*** 247,252 ****
  	    return fUnimplemented;
  	nFonts = ttfReader__UInt(r);
! 	if(nTTC > nFonts)
! 	    nTTC = 0;
  	for(i = 0; i <= nTTC; i++)
  	    nPos = ttfReader__UInt(r);
--- 248,255 ----
  	    return fUnimplemented;
  	nFonts = ttfReader__UInt(r);
! 	if (nFonts == 0)
! 	    return fBadFontData;
! 	if(nTTC >= nFonts)
! 	    return fTableNotFound;
  	for(i = 0; i <= nTTC; i++)
  	    nPos = ttfReader__UInt(r);
 
 
 
*** f:\casper\HEAD\gs\src\ttinterp.c	Sun Nov 23 13:07:07 2003
--- files\gs\src\ttinterp.c	Tue Nov 25 14:57:38 2003
***************
*** 5081,5085 ****
      PDefRecord   WITH;
      PCallRecord  WITH1;
!     bool bFirst = true;
  #   ifdef DEBUG
  	ttfMemory *mem = exc->current_face->font->tti->ttf_memory;
--- 5081,5085 ----
      PDefRecord   WITH;
      PCallRecord  WITH1;
!     bool bFirst;
  #   ifdef DEBUG
  	ttfMemory *mem = exc->current_face->font->tti->ttf_memory;
***************
*** 5123,5126 ****
--- 5123,5127 ----
  	goto _LExit;
      }
+     bFirst = true;
  
      do
 
 
 
*** f:\casper\HEAD\gs\src\zdscpars.c	Sun Jun 16 07:43:51 2002
--- files\gs\src\zdscpars.c	Tue Nov 25 14:57:41 2003
***************
*** 406,410 ****
      const char * const *pBadList = BadCmdlist;
      ref * pvalue;
!     CDSC * dsc_data;
      dict_param_list list;
  
--- 406,410 ----
      const char * const *pBadList = BadCmdlist;
      ref * pvalue;
!     CDSC * dsc_data = NULL;
      dict_param_list list;
  
 
 
 
*** f:\casper\HEAD\gs\src\zht2.c	Sat Jan 11 21:29:54 2003
--- files\gs\src\zht2.c	Tue Nov 25 14:57:43 2003
***************
*** 159,165 ****
      rc_alloc_struct_0(pdht, gx_device_halftone, &st_device_halftone,
  		      imemory, pdht = 0, ".sethalftone5");
!     if (pht == 0 || phtc == 0 || pdht == 0)
  	code = gs_note_error(e_VMerror);
!     else {
          dict_enum = dict_first(op);
  	for (j = 0, pc = phtc; ;) {
--- 159,168 ----
      rc_alloc_struct_0(pdht, gx_device_halftone, &st_device_halftone,
  		      imemory, pdht = 0, ".sethalftone5");
!     if (pht == 0 || phtc == 0 || pdht == 0) {
! 	j = 0; /* Quiet the compiler: 
! 	          gs_note_error isn't necessarily identity, 
! 		  so j could be left ununitialized. */
  	code = gs_note_error(e_VMerror);
!     } else {
          dict_enum = dict_first(op);
  	for (j = 0, pc = phtc; ;) {

lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.