* eina: Add explanation around compiler false positiv warning.
authorcedric <cedric>
Mon, 14 Sep 2009 15:28:55 +0000 (15:28 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 14 Sep 2009 15:28:55 +0000 (15:28 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@42488 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_array.c
src/lib/eina_rbtree.c

index a0fe244..b2c51dd 100644 (file)
@@ -522,6 +522,10 @@ EAPI Eina_Bool
 eina_array_remove(Eina_Array *array, Eina_Bool (*keep)(void *data, void *gdata), void *gdata)
 {
    void **tmp;
+   /* WARNING:
+      The algorithm does exit before using unitialized data. So compiler is
+      giving you a false positiv here too.
+    */
    void *data;
    unsigned int total = 0;
    unsigned int limit;
index 3e8e1ec..cf98505 100644 (file)
@@ -257,6 +257,11 @@ eina_rbtree_inline_insert(Eina_Rbtree *root, Eina_Rbtree *node, Eina_Rbtree_Cmp_
    Eina_Rbtree head;
    Eina_Rbtree *g, *t;  /* Grandparent & parent */
    Eina_Rbtree *p, *q;  /* Iterator & parent */
+   /* WARNING:
+      Compiler is not able to understand the underlying algorithm and don't know that
+      first top node is always black, so it will never use last before running the loop
+      one time.
+    */
    Eina_Rbtree_Direction dir, last;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(node, root);