Browse Source

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>
pull/2938/head
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
7835a25121
  1. 5
      common/utils.h

5
common/utils.h

@ -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 */

Loading…
Cancel
Save