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
// 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)); \