raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bfb275989190e03dcb3830a22f6bb85b3dd99f46
commit bfb275989190e03dcb3830a22f6bb85b3dd99f46 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Wed Oct 21 21:01:59 2015 +0900 eo - shut clang up because otherwise i have to argue with peolpe so. clang is wrong. end of story. it complains that i should add braces to: static Eo_Call_Cache ___callcache = { 0 }; WRONG. that is correct c99. 100%. you can add more {}'s and init every field separately like {{0},{0},{0}} etc. or make it 1 or any value - it doesn't matter... clang complains. clang is wrong. plain and simple. this warning should just never exist. it is pointless. but... peolpe won't shut up about clang warnings until i "fool" clang into being silent by assuming the default 0 value of static storage. this silences clang --- src/lib/eo/Eo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index a16c872..6f5e4bd 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -479,8 +479,8 @@ typedef struct _Eo_Call_Cache // cache OP id, get real fct and object data then do the call #define EO_FUNC_COMMON_OP(Name, DefRet) \ - static Eo_Call_Cache ___callcache = { 0 }; \ - static Eo_Op ___op = EO_NOOP; \ + static Eo_Call_Cache ___callcache; /* static 0 by default */ \ + static Eo_Op ___op; /* static 0 by default */ \ Eo_Op_Call_Data ___call; \ if (___op == EO_NOOP) \ ___op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(Name)); \ --
