summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-21 21:01:59 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-21 21:01:59 +0900
commitbfb275989190e03dcb3830a22f6bb85b3dd99f46 (patch)
tree80f79e6f43f7faba7bbac04aa226b79475f4872f
parent7cc41473a30236b11f0c7b57425e273d2874e30e (diff)
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
-rw-r--r--src/lib/eo/Eo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index a16c872b16..6f5e4bd425 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -479,8 +479,8 @@ typedef struct _Eo_Call_Cache
479 479
480// cache OP id, get real fct and object data then do the call 480// cache OP id, get real fct and object data then do the call
481#define EO_FUNC_COMMON_OP(Name, DefRet) \ 481#define EO_FUNC_COMMON_OP(Name, DefRet) \
482 static Eo_Call_Cache ___callcache = { 0 }; \ 482 static Eo_Call_Cache ___callcache; /* static 0 by default */ \
483 static Eo_Op ___op = EO_NOOP; \ 483 static Eo_Op ___op; /* static 0 by default */ \
484 Eo_Op_Call_Data ___call; \ 484 Eo_Op_Call_Data ___call; \
485 if (___op == EO_NOOP) \ 485 if (___op == EO_NOOP) \
486 ___op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(Name)); \ 486 ___op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(Name)); \