From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: valgrind warnings [Re: Emacs bzr memory footprint] Date: Fri, 28 Oct 2011 21:03:59 +0200 Message-ID: <83ehxx9bvk.fsf@gnu.org> References: <87ty73mc0m.fsf@spindle.srvr.nix> <4EA19111.7060401@yandex.ru> <87vcrhfmww.fsf@uwakimon.sk.tsukuba.ac.jp> <87pqhpf1qo.fsf@uwakimon.sk.tsukuba.ac.jp> <87k47qaxvz.fsf@lifelogs.com> <83bot1bovw.fsf@gnu.org> <87y5w531eo.fsf@uwakimon.sk.tsukuba.ac.jp> <83zkgla1mg.fsf@gnu.org> <87vcr92z6x.fsf@uwakimon.sk.tsukuba.ac.jp> <83ty6t9zd0.fsf@gnu.org> <83obx19lvo.fsf@gnu.org> <83ipn99d4l.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1319828646 16119 80.91.229.12 (28 Oct 2011 19:04:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2011 19:04:06 +0000 (UTC) Cc: stephen@xemacs.org, emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 28 21:04:02 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RJrij-00057x-U1 for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2011 21:04:02 +0200 Original-Received: from localhost ([::1]:59608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJrih-0006UF-0T for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2011 15:03:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJrid-0006Tu-TR for emacs-devel@gnu.org; Fri, 28 Oct 2011 15:03:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJric-0006Q4-VO for emacs-devel@gnu.org; Fri, 28 Oct 2011 15:03:55 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:49332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJrib-0006PX-51; Fri, 28 Oct 2011 15:03:53 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LTS00M00I4DNS00@a-mtaout21.012.net.il>; Fri, 28 Oct 2011 21:03:51 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LTS00MGLIADGFF0@a-mtaout21.012.net.il>; Fri, 28 Oct 2011 21:03:51 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145727 Archived-At: > From: Dan Nicolaescu > Cc: stephen@xemacs.org, emacs-devel@gnu.org > 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.