summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-01-09 17:27:02 +0800
committerChong Yidong <cyd@gnu.org>2012-01-09 17:27:02 +0800
commit0c5b9eef72cbb54964d34c28ddffd17a0646bc87 (patch)
tree8437ae3dbf4f1dd4f6c93ef6aa5fb7c17332c278
parentde92a50b9e157cac071355b9836717e62b9edff1 (diff)
downloademacs-0c5b9eef72cbb54964d34c28ddffd17a0646bc87.tar.gz
Fix use of uninitialized variable (backport from trunk).
* xdisp.c (note_mouse_highlight): Initialize `part', to avoid a possible random value that matches one of those tested as condition to clear the mouse face.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d0c89f2e44c..c819bb08369 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-09 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
+ possible random value that matches one of those tested as
+ condition to clear the mouse face.
+
2012-01-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* dispnew.c (scrolling_window): Truncate overlaps in copy
diff --git a/src/xdisp.c b/src/xdisp.c
index ebd660acc06..8e5cf3d8f3e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23484,7 +23484,7 @@ note_mouse_highlight (f, x, y)
int x, y;
{
Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
- enum window_part part;
+ enum window_part part = ON_NOTHING;
Lisp_Object window;
struct window *w;
Cursor cursor = No_Cursor;