From 6abdaa4a9fff89473f0c577057680198613993b8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 Apr 2011 19:02:18 -0700 Subject: [PATCH] * xselect.c (x_get_local_selection, x_handle_property_notify): Remove vars that are set but not used. (make_invisible_cursor): Initialize a possibly-uninitialized variable. --- src/ChangeLog | 6 ++++++ src/xselect.c | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 437924fe4a7..17cc06bfe32 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,12 @@ +2011-04-02 Paul Eggert + + * xselect.c (x_get_local_selection, x_handle_property_notify): + Remove vars that are set but not used. + 2011-04-01 Paul Eggert * xfns.c (x_create_tip_frame): Remove var that is set but not used. + (make_invisible_cursor): Initialize a possibly-uninitialized variable. * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]: Remove var that is set but not used. diff --git a/src/xselect.c b/src/xselect.c index 451b2a0b13f..430b7232659 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -391,7 +391,7 @@ static Lisp_Object x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, int local_request) { Lisp_Object local_value; - Lisp_Object handler_fn, value, type, check; + Lisp_Object handler_fn, value, check; int count; local_value = assq_no_quit (selection_symbol, Vselection_alist); @@ -469,7 +469,6 @@ x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, in check = value; if (CONSP (value) && SYMBOLP (XCAR (value))) - type = XCAR (value), check = XCDR (value); if (STRINGP (check) @@ -1203,9 +1202,9 @@ wait_for_property_change (struct prop_location *location) void x_handle_property_notify (XPropertyEvent *event) { - struct prop_location *prev = 0, *rest = property_change_wait_list; + struct prop_location *rest; - while (rest) + for (rest = property_change_wait_list; rest; rest = rest->next) { if (!rest->arrived && rest->property == event->atom @@ -1226,9 +1225,6 @@ x_handle_property_notify (XPropertyEvent *event) return; } - - prev = rest; - rest = rest->next; } } -- 2.39.2