all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem report #130: base/src/emacs/src/xterm.c (x_draw_glyph_string); UNINIT
@ 2008-12-03  1:16 Dan Nicolaescu
  2008-12-03  4:12 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2008-12-03  1:16 UTC (permalink / raw)
  To: emacs-devel

CID: 130
Checker: UNINIT (help)
File: base/src/emacs/src/xterm.c
Function: x_draw_glyph_string
Description: Using uninitialized value "position"

Event var_decl: Declared variable "position" without initializer
Also see events: [uninit_use]

2729 		  unsigned long thickness, position;
2730 		  int y;
2731 	

At conditional (1): "(s)->prev != 0" taking true path
At conditional (2): "(((s)->prev)->face)->underline_p != 0" taking false path

2732 		  if (s->prev && s->prev->face->underline_p)
2733 		    {
2734 		      /* We use the same underline style as the previous one.  */
2735 		      thickness = s->prev->underline_thickness;
2736 		      position = s->prev->underline_position;
2737 		    }
2738 		  else
2739 		    {
2740 		      /* Get the underline thickness.  Default is 1 pixel.  */

At conditional (3): "(s)->font != 0" taking false path

2741 		      if (s->font && s->font->underline_thickness > 0)
2742 			thickness = s->font->underline_thickness;
2743 		      else
2744 			thickness = 1;

At conditional (4): "x_underline_at_descent_line != 0" taking false path

2745 		      if (x_underline_at_descent_line)
2746 			position = (s->height - thickness) - (s->ybase - s->y);
2747 		      else
2748 			{
2749 			  /* Get the underline position.  This is the recommended
2750 			     vertical offset in pixels from the baseline to the top of
2751 			     the underline.  This is a signed value according to the
2752 			     specs, and its default is
2753 	
2754 			     ROUND ((maximum descent) / 2), with
2755 			     ROUND(x) = floor (x + 0.5)  */
2756 	

At conditional (5): "x_use_underline_position_properties != 0" taking true path
At conditional (6): "(s)->font != 0" taking false path

2757 			  if (x_use_underline_position_properties
2758 			      && s->font && s->font->underline_position >= 0)
2759 			    position = s->font->underline_position;

At conditional (7): "(s)->font != 0" taking false path

2760 			  else if (s->font)
2761 			    position = (s->font->descent + 1) / 2;
2762 			}

Event uninit_use: Using uninitialized value "position"
Also see events: [var_decl]

2763 		      position = max (position, underline_minimum_offset);
2764 		    }




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem report #130: base/src/emacs/src/xterm.c (x_draw_glyph_string); UNINIT
  2008-12-03  1:16 Problem report #130: base/src/emacs/src/xterm.c (x_draw_glyph_string); UNINIT Dan Nicolaescu
@ 2008-12-03  4:12 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2008-12-03  4:12 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> CID: 130
> Checker: UNINIT (help)
> File: base/src/emacs/src/xterm.c
> Function: x_draw_glyph_string
> Description: Using uninitialized value "position"

Fixed (I'm not sure if this bug appears in practice, tho).  Thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-03  4:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03  1:16 Problem report #130: base/src/emacs/src/xterm.c (x_draw_glyph_string); UNINIT Dan Nicolaescu
2008-12-03  4:12 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.