* xselect.c (x_get_local_selection, x_handle_property_notify):
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Apr 2011 02:02:18 +0000 (19:02 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Apr 2011 02:02:18 +0000 (19:02 -0700)
Remove vars that are set but not used.

(make_invisible_cursor): Initialize a possibly-uninitialized variable.

src/ChangeLog
src/xselect.c

index 437924f..17cc06b 100644 (file)
@@ -1,6 +1,12 @@
+2011-04-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xselect.c (x_get_local_selection, x_handle_property_notify):
+       Remove vars that are set but not used.
+
 2011-04-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        * 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.
index 451b2a0..430b723 100644 (file)
@@ -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;
     }
 }