From 4b4fe2f4fb7c9a7dfccfa27e4cfa1e9b6611b3e8 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Tue, 22 Sep 2020 21:59:58 +0200 Subject: [PATCH] dual-openingd: msg_type should be dualopend_wire not u8 clang did the hard work here: openingd/dualopend.c:958:42: error: result of comparison of constant 'WIRE_DUAL_OPEN_FAIL' (7003) with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if ((msg_type = fromwire_peektype(msg)) == WIRE_DUAL_OPEN_FAIL) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~ Co-Authored-by: the clang compiler Signed-off-by: Antoine Poinsot --- openingd/dualopend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openingd/dualopend.c b/openingd/dualopend.c index e563db2d6..051060837 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -853,7 +853,7 @@ static u8 *accepter_start(struct state *state, const u8 *oc2_msg) struct penalty_base *pbase; struct amount_msat our_msats; struct amount_sat total; - u8 msg_type; + enum dualopend_wire msg_type; state->our_role = ACCEPTER; open_tlv = tlv_opening_tlvs_new(tmpctx);