AFAIU this function behaves like pure, as it will behave the same on every call (given a symbol and a subdir, the result is always the same).
On Tue, May 15, 2018 at 4:23 AM, Marcel Hollerbach <m...@bu5hm4n.de> wrote: > Looking quichly at the definition of those two attributes. They conflict... > > Something cannot call malloc when its pure, as the function is not the same > when called twice with the same global and local state ... > > Removing pure is enough IMO. > > Greetings, > bu5hm4n > > i) malloc: > The malloc attribute is used to tell the compiler that a function may be > treated as if any non-NULL pointer it returns cannot alias any other pointer > valid when the function returns and that the memory has undefined content. > This often improves optimization. Standard functions with this property > include malloc and calloc. realloc-like functions do not have this property > as the memory pointed to does not have undefined content. > > ii) pure: > Many functions have no effects except to return a value, and their return > value depends only on the parameters and global variables. Functions of this > kind can be subject to data flow analysis and might be eliminated. > > > On 05/15/2018 08:09 AM, Daniel Zaoui wrote: >> >> Hello guys, >> >> After my system update (Arch), I get the following warning (a lot) during >> the compilation of EFL: >> >> ../src/lib/eina/eina_module.h:233:2: warning: ignoring attribute 'malloc' >> because it conflicts with attribute 'pure' [-Wattributes] >> eina_module_symbol_path_get(const void *symbol, const char *sub_dir) >> EINA_PURE EINA_MALLOC EINA_ARG_NONNULL(1, 2); >> >> Someone knows how to deal with that? >> >> Thanks >> D2 >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> enlightenment-devel mailing list >> enlightenment-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel