Skip to content

dual-openingd: msg_type should be dualopend_wire not u8#4076

Merged
rustyrussell merged 1 commit into
ElementsProject:masterfrom
darosior:dualopend_wiretype
Sep 23, 2020
Merged

dual-openingd: msg_type should be dualopend_wire not u8#4076
rustyrussell merged 1 commit into
ElementsProject:masterfrom
darosior:dualopend_wiretype

Conversation

@darosior
Copy link
Copy Markdown
Contributor

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) {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~

Found while rebasing #4013

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 <darosior@protonmail.com>
@rustyrussell
Copy link
Copy Markdown
Contributor

Ack a158458

@rustyrussell rustyrussell merged commit 4b4fe2f into ElementsProject:master Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants