2008-03-19 Li Yuan <li.yuan@sun.com>
authorliyuan <liyuan@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 19 Mar 2008 07:09:37 +0000 (07:09 +0000)
committerliyuan <liyuan@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 19 Mar 2008 07:09:37 +0000 (07:09 +0000)
        * libspi/collection.c: (match_attributes_none_p), (inorder),
        (getMatchesInOrder):
        * registryd/deviceeventcontroller.c:
        (impl_generate_keyboard_event):
        Bug #521667. Patch from Jens Granseuer <jensgr@gmx.net>.
        Fixes several C99 idioms that lead to compilation errors
        with older compilers like gcc 2.x. Also removes a few unused
        variables.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@996 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
libspi/collection.c
registryd/deviceeventcontroller.c

index b4d9405..efd5f20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-03-19  Li Yuan  <li.yuan@sun.com>
+
+       * libspi/collection.c: (match_attributes_none_p), (inorder),
+       (getMatchesInOrder):
+       * registryd/deviceeventcontroller.c:
+       (impl_generate_keyboard_event):
+       Bug #521667. Patch from Jens Granseuer <jensgr@gmx.net>.
+       Fixes several C99 idioms that lead to compilation errors
+       with older compilers like gcc 2.x. Also removes a few unused
+       variables.
+
 2008-03-14  Li Yuan  <li.yuan@sun.com>
 
        * atk-bridge/bridge.c: (deregister_application):
index c36096a..854c4bd 100644 (file)
@@ -496,7 +496,6 @@ match_attributes_none_p (Accessibility_Accessible child,
 
      int i, k;
      Accessibility_AttributeSet *oa;
-     gboolean flag = FALSE;
 
      if (attributes->_length == 0 || attributes == NULL)
          return TRUE;
@@ -758,10 +757,9 @@ inorder (Accessibility_Accessible collection, MatchRulePrivate *mrp,
   while ((max == 0 || kount < max) 
           && ! CORBA_Object_is_equivalent (obj, collection, ev))
   {
-
-    i = Accessibility_Accessible_getIndexInParent (obj, ev);
     Accessibility_Accessible parent =  
                                 Accessibility_Accessible__get_parent (obj, ev);
+    i = Accessibility_Accessible_getIndexInParent (obj, ev);
     kount  = sort_order_canonical (mrp, ls, kount, max, parent, 
                                    i+1, TRUE, FALSE, TRUE, TRUE, ev);
     obj = parent;
@@ -792,7 +790,7 @@ getMatchesInOrder (PortableServer_Servant servant,
                   CORBA_Environment *ev){
   GList *ls = NULL;
   AtkObject *aobj;
-  Accessibility_Accessible obj, collection;
+  Accessibility_Accessible obj;
   MatchRulePrivate *mrp;
   gint kount = 0;
 
index b80184a..ee43061 100644 (file)
@@ -2280,6 +2280,7 @@ impl_generate_keyboard_event (PortableServer_Servant           servant,
        SPI_DEVICE_EVENT_CONTROLLER (bonobo_object (servant));
   gint err;
   KeySym keysym;
+  DEControllerPrivateData *priv;
 
 #ifdef SPI_DEBUG
        fprintf (stderr, "synthesizing keystroke %ld, type %d\n",
@@ -2294,7 +2295,7 @@ impl_generate_keyboard_event (PortableServer_Servant           servant,
   
   gdk_error_trap_push ();
 
-  DEControllerPrivateData *priv = (DEControllerPrivateData *) 
+  priv = (DEControllerPrivateData *) 
       g_object_get_qdata (G_OBJECT (controller), spi_dec_private_quark);
 
   if (!priv->have_xkb && xmkeymap==NULL) {