common: helper to suppress 'may be used uninitialized' warnings.

When gcc still warns at -O3 and you are sure it's not necessary,
this marks it appropriately.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-08-01 11:03:54 +09:30 committed by Christian Decker
parent df298ba7e3
commit 7835a25121

View file

@ -54,4 +54,9 @@ STRUCTEQ_DEF(sha256, 0, u);
/* Define ripemd160_eq. */
STRUCTEQ_DEF(ripemd160, 0, u);
/* If gcc complains about 'may be uninitialized' even at -O3, and the code is
* clear, use this to suppress it. Argument should be gcc version it
* complained on, so we can re-test as gcc evolves. */
#define COMPILER_WANTS_INIT(compiler_versions) = 0
#endif /* LIGHTNING_COMMON_UTILS_H */