Fix -Wparentheses gcc warning#25641
Merged
maflcko merged 1 commit intobitcoin:masterfrom Jul 19, 2022
Merged
Conversation
Member
|
ACK d68ca4e |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Jul 19, 2022
d68ca4e Fix `-Wparentheses` gcc warning (Hennadii Stepanov) Pull request description: This PR fixes `-Wparentheses` gcc warning which has been introduced in bitcoin#25624. On the master branch (6d8707b): ``` $ gcc --version gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make > /dev/null In file included from ./net.h:29, from ./net_processing.h:9, from test/fuzz/txorphan.cpp:7: test/fuzz/txorphan.cpp: In lambda function: test/fuzz/txorphan.cpp:116:70: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses] 116 | Assert(!have_tx == GetTransactionWeight(*tx) > MAX_STANDARD_TX_WEIGHT); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ./util/check.h:74:50: note: in definition of macro ‘Assert’ 74 | #define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val) | ^~~ ``` ACKs for top commit: MarcoFalke: ACK d68ca4e Tree-SHA512: 5c98df4d6a6124d048b16eb3caf29bb396223d3394c1f48efc0fe0c8fd334d67dbf64d0b2e40faf9eda6f6a537885abcff05c61e410cfb317737e3dc361791ee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes
-Wparenthesesgcc warning which has been introduced in #25624.On the master branch (6d8707b):