Fix `-Wparentheses` gcc warning #25641

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220719-parentheses changing 1 files +1 −1
  1. hebasto commented at 9:49 AM on July 19, 2022: member

    This PR fixes -Wparentheses gcc warning which has been introduced in bitcoin/bitcoin#25624.

    On the master branch (6d8707b21d3a5b4abb76b773a69f2bfac22bcd93):

    $ 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)
          |                                                  ^~~
    
  2. Fix `-Wparentheses` gcc warning d68ca4ef64
  3. MarcoFalke commented at 11:28 AM on July 19, 2022: member

    ACK d68ca4ef64405d0d7c628a71d0f2bbae68e63cda

  4. MarcoFalke merged this on Jul 19, 2022
  5. MarcoFalke closed this on Jul 19, 2022

  6. hebasto deleted the branch on Jul 19, 2022
  7. sidhujag referenced this in commit ad55489b21 on Jul 19, 2022
  8. bitcoin locked this on Jul 19, 2023
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me