all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem report #63
@ 2006-04-11 15:48 Dan Nicolaescu
  2006-04-11 16:59 ` Stuart D. Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Nicolaescu @ 2006-04-11 15:48 UTC (permalink / raw)


Thanks for analyzing the previous reports. The batch I am sending now
is the last for the emacs/src/* files.

CID: 63
Checker: UNINIT (help)
File: emacs/src/window.c
Function: Fpos_visible_in_window_p
Description: Using uninitialized value "y"

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

CID: 63
Checker: UNINIT (help)
File: emacs/src/window.c
Function: Fpos_visible_in_window_p
Description: Using uninitialized value "x"


352  	  int x, y;
353  	
354  	  w = decode_window (window);
355  	  buf = XBUFFER (w->buffer);
356  	  SET_TEXT_POS_FROM_MARKER (top, w->start);
357  	

At conditional (1): "pos != Qnil" taking true path

358  	  if (!NILP (pos))
359  	    {

At conditional (2): "pos & 7 == 2" taking true path
At conditional (3): "((pos & -8)->u_marker).type == 24236" taking true path
At conditional (4): "0" taking false path

360  	      CHECK_NUMBER_COERCE_MARKER (pos);
361  	      posint = XINT (pos);
362  	    }
363  	  else if (w == XWINDOW (selected_window))
364  	    posint = PT;
365  	  else
366  	    posint = XMARKER (w->pointm)->charpos;
367  	
368  	  /* If position is above window start or outside buffer boundaries,
369  	     or if window start is out of range, position is not visible.  */

At conditional (5): "posint >= (top).charpos" taking true path
At conditional (6): "posint <= (buf)->zv" taking true path
At conditional (7): "(top).charpos >= (buf)->begv" taking true path
At conditional (8): "(top).charpos <= (buf)->zv" taking false path

370  	  if (posint >= CHARPOS (top)
371  	      && posint <= BUF_ZV (buf)
372  	      && CHARPOS (top) >= BUF_BEGV (buf)
373  	      && CHARPOS (top) <= BUF_ZV (buf)
374  	      && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, NILP (partially))
375  	      && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p)))
376  	    in_window = Qt;
377  	

At conditional (9): "in_window != Qnil" taking true path
At conditional (10): "partially != Qnil" taking true path

378  	  if (!NILP (in_window) && !NILP (partially))

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

379  	    in_window = Fcons (make_number (x),
380  			       Fcons (make_number (y),
381  				      Fcons ((fully_p ? Qnil
382  					     : Fcons (make_number (rtop),
383  						      make_number (rbot))),
384  					     Qnil)));

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

352  	  int x, y;
353  	
354  	  w = decode_window (window);
355  	  buf = XBUFFER (w->buffer);
356  	  SET_TEXT_POS_FROM_MARKER (top, w->start);
357  	

At conditional (1): "pos != Qnil" taking true path

358  	  if (!NILP (pos))
359  	    {

At conditional (2): "pos & 7 == 2" taking true path
At conditional (3): "((pos & -8)->u_marker).type == 24236" taking true path
At conditional (4): "0" taking false path

360  	      CHECK_NUMBER_COERCE_MARKER (pos);
361  	      posint = XINT (pos);
362  	    }
363  	  else if (w == XWINDOW (selected_window))
364  	    posint = PT;
365  	  else
366  	    posint = XMARKER (w->pointm)->charpos;
367  	
368  	  /* If position is above window start or outside buffer boundaries,
369  	     or if window start is out of range, position is not visible.  */

At conditional (5): "posint >= (top).charpos" taking true path
At conditional (6): "posint <= (buf)->zv" taking true path
At conditional (7): "(top).charpos >= (buf)->begv" taking true path
At conditional (8): "(top).charpos <= (buf)->zv" taking false path

370  	  if (posint >= CHARPOS (top)
371  	      && posint <= BUF_ZV (buf)
372  	      && CHARPOS (top) >= BUF_BEGV (buf)
373  	      && CHARPOS (top) <= BUF_ZV (buf)
374  	      && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, NILP (partially))
375  	      && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p)))
376  	    in_window = Qt;
377  	

At conditional (9): "in_window != Qnil" taking true path
At conditional (10): "partially != Qnil" taking true path

378  	  if (!NILP (in_window) && !NILP (partially))

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

379  	    in_window = Fcons (make_number (x),
380  			       Fcons (make_number (y),
381  				      Fcons ((fully_p ? Qnil
382  					     : Fcons (make_number (rtop),
383  						      make_number (rbot))),
384  					     Qnil)));

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

* Re: Problem report #63
  2006-04-11 15:48 Problem report #63 Dan Nicolaescu
@ 2006-04-11 16:59 ` Stuart D. Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Stuart D. Herring @ 2006-04-11 16:59 UTC (permalink / raw)


> 370  	  if (posint >= CHARPOS (top)
> 371  	      && posint <= BUF_ZV (buf)
> 372  	      && CHARPOS (top) >= BUF_BEGV (buf)
> 373  	      && CHARPOS (top) <= BUF_ZV (buf)
> 374  	      && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, NILP
> (partially))
> 375  	      && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p)))
> 376  	    in_window = Qt;
> 377

in_window was Qnil before this section: x and y have been assigned by
pos_visible_p() if it's no longer Qnil.

> At conditional (9): "in_window != Qnil" taking true path
> At conditional (10): "partially != Qnil" taking true path
>
> 378  	  if (!NILP (in_window) && !NILP (partially))
>
> Event uninit_use: Using uninitialized value "y"
> Also see events: [var_decl]
>
> 379  	    in_window = Fcons (make_number (x),
> 380  			       Fcons (make_number (y),
> 381  				      Fcons ((fully_p ? Qnil
> 382  					     : Fcons (make_number (rtop),
> 383  						      make_number (rbot))),
> 384  					     Qnil)));

Here, if x and y are used, in_window isn't Qnil, so they were assigned. 
No bug.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

end of thread, other threads:[~2006-04-11 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 15:48 Problem report #63 Dan Nicolaescu
2006-04-11 16:59 ` Stuart D. Herring

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.