remove dead stores and reduce some variable scope.
authorbarbieri <barbieri>
Tue, 23 Dec 2008 19:17:55 +0000 (19:17 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 23 Dec 2008 19:17:55 +0000 (19:17 +0000)
from clang report.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@38294 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_accessor.c
src/lib/eina_rbtree.c
src/lib/eina_rectangle.c

index 5c39f16..16b3e89 100644 (file)
@@ -158,7 +158,7 @@ eina_accessor_over(Eina_Accessor *accessor,
 {
    void *container;
    void *data;
-   unsigned int i = start;
+   unsigned int i;
 
    EINA_MAGIC_CHECK_ACCESSOR(accessor);
 
index a6b56c2..d56bae3 100644 (file)
@@ -324,7 +324,7 @@ EAPI Eina_Rbtree *
 eina_rbtree_inline_remove(Eina_Rbtree *root, Eina_Rbtree *node, Eina_Rbtree_Cmp_Node_Cb cmp, const void *data)
 {
    Eina_Rbtree head;
-   Eina_Rbtree *q, *p, *g;
+   Eina_Rbtree *q, *p;
    Eina_Rbtree *f = NULL;
    Eina_Rbtree_Direction dir;
 
@@ -334,13 +334,14 @@ eina_rbtree_inline_remove(Eina_Rbtree *root, Eina_Rbtree *node, Eina_Rbtree_Cmp_
 
    dir = EINA_RBTREE_RIGHT;
    q = &head;
-   g = p = NULL;
+   p = NULL;
    q->son[EINA_RBTREE_RIGHT] = root;
 
    /* Search and push a red down */
    while (q->son[dir] != NULL)
      {
        Eina_Rbtree_Direction last = dir;
+       Eina_Rbtree *g;
 
        /* Update helpers */
        g = p; p = q;
index 16f490a..05a9dd7 100644 (file)
@@ -102,7 +102,6 @@ _eina_rectangle_pool_find(Eina_Rectangle_Alloc *head, int poolw, int poolh, int
        Eina_Bool t2 = EINA_TRUE;
        Eina_Bool t3 = EINA_TRUE;
        Eina_Bool t4 = EINA_TRUE;
-       Eina_Bool intersects;
 
        if ((rect->x + rect->w + w) > poolw) t1 = EINA_FALSE;
        if ((rect->y + h) > poolh) t1 = EINA_FALSE;
@@ -113,9 +112,9 @@ _eina_rectangle_pool_find(Eina_Rectangle_Alloc *head, int poolw, int poolh, int
        if ((rect->x + w) > poolw) t4 = EINA_FALSE;
        if ((rect->y - h) < 0) t4 = EINA_FALSE;
 
-       intersects = EINA_FALSE;
        if (t1)
          {
+            Eina_Bool intersects;
             /* 1. try here:
              * +----++--+
              * |AAAA||??|
@@ -128,9 +127,9 @@ _eina_rectangle_pool_find(Eina_Rectangle_Alloc *head, int poolw, int poolh, int
 
             if (!intersects) goto on_intersect;
          }
-       intersects = EINA_FALSE;
        if (t2)
          {
+            Eina_Bool intersects;
             /* 2. try here:
              * +----+
              * |AAAA|
@@ -146,9 +145,9 @@ _eina_rectangle_pool_find(Eina_Rectangle_Alloc *head, int poolw, int poolh, int
 
             if (!intersects) goto on_intersect;
          }
-       intersects = EINA_FALSE;
        if (t3)
          {
+            Eina_Bool intersects;
             /* 3. try here:
              * +--++----+
              * |??||AAAA|
@@ -161,9 +160,9 @@ _eina_rectangle_pool_find(Eina_Rectangle_Alloc *head, int poolw, int poolh, int
 
             if (!intersects) goto on_intersect;
          }
-       intersects = EINA_FALSE;
        if (t4)
          {
+            Eina_Bool intersects;
             /* 2. try here:
              * +--+
              * |??|