On Tue, Oct 7, 2008 at 8:20 AM, Cedric BAIL <[EMAIL PROTECTED]> wrote: >> eina_hash.c: In function 'eina_hash_del': >> eina_hash.c:820: warning: 'hash_num' may be used uninitialized in this >> function > > This warning is a false positive as the code should never execute the > code using hash_num if it's uninitialized. And I don't want to hide > this warning as if this goes wrong somewhere valgrind will be able to > tell me what is going on.
as for this warning and others related, it's due bad design, so it's indeed a bug. Ok, we're using the high-level api there to make it easy, that api will then choose whatever to use, and we're quite sure it will not use the wrong value, and we want to confirm that (with valgrind). But what should be done is to split the high level api into 2 static internal functions, that will be used by this high level api and by the function currently giving warnings. This way we remove the warnings and remove some parameters while calling the functions and still leaves option for compiler to remove the function call and duplicate the code if it is worth (inline). For this case it might not be the most dramatic optimization, but it will help everywhere. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [EMAIL PROTECTED] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel