lightningd: suppress gcc-7.4.0 error

In file included from wallet/test/run-wallet.c:15:0:
./lightningd/peer_htlcs.c: In function ‘htlcs_reconnect’:
./lightningd/peer_htlcs.c:2060:15: error: ‘failcode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   }  else if (failcode) {
               ^~~~~~~~
./lightningd/peer_htlcs.c:2056:19: error: ‘failcode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
          failcode != 0
          ~~~~~~~~~^~~~

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

View File

@@ -1990,7 +1990,7 @@ void htlcs_reconnect(struct lightningd *ld,
struct htlc_in *hin;
struct htlc_out *hout;
struct htlc_in_map unprocessed;
enum onion_type failcode;
enum onion_type failcode COMPILER_WANTS_INIT("gcc7.4.0 bad, 8.3 OK");
/* Any HTLCs which happened to be incoming and weren't forwarded before
* we shutdown/crashed: fail them now.