* eina: Add explanation around compiler false positiv warning.

SVN revision: 42488
This commit is contained in:
Cedric BAIL 2009-09-14 15:28:55 +00:00
parent 0b8f43494a
commit d117093a55
2 changed files with 9 additions and 0 deletions

View 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;

View 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);