emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: valgrind warnings [Re: Emacs bzr memory footprint]


From: Eli Zaretskii
Subject: Re: valgrind warnings [Re: Emacs bzr memory footprint]
Date: Fri, 28 Oct 2011 21:03:59 +0200

> From: Dan Nicolaescu <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Fri, 28 Oct 2011 14:52:35 -0400
> 
> === modified file 'src/xdisp.c'
> --- src/xdisp.c   2011-10-19 11:46:17 +0000
> +++ src/xdisp.c   2011-10-28 16:29:15 +0000
> @@ -26801,7 +26801,7 @@ void
>  note_mouse_highlight (struct frame *f, int x, int y)
>  {
>    Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
> -  enum window_part part;
> +  enum window_part part = -42;
>    Lisp_Object window;
>    struct window *w;
>    Cursor cursor = No_Cursor;
> @@ -26838,7 +26838,7 @@ note_mouse_highlight (struct frame *f, i
>    /* If we were displaying active text in another window, clear that.
>       Also clear if we move out of text area in same window.  */
>    if (! EQ (window, hlinfo->mouse_face_window)
> -      || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE
> +      || ((part == -42 ? exit (1),1: 1) &&  part != ON_TEXT && part != 
> ON_MODE_LINE && part != ON_HEADER_LINE
>          && !NILP (hlinfo->mouse_face_window)))
>      clear_mouse_face (hlinfo);
>  
> 
> This is before Yidong's fix.

Ah, now I understand.  The call to `exit' should have been where
there's a call to clear_mouse_face, to see if the uninitialized value
really matters, because the `!NILP (hlinfo->mouse_face_window)' part
would have taken care of the -42 value (when `part' is not touched by
window_from_coordinates, `window' is nil, so you only get to test
`part' when hlinfo->mouse_face_window is also nil).

Anyway, the variable is now initialized.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]