refactor: fix -Wbraced-scalar-init warning in validation tests #20060

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:braces_scalar_init changing 1 files +1 −1
  1. fanquake commented at 4:38 am on October 2, 2020: member

    Introduced in #20004 (fa29b5ae666bbb4c19188f0dcf8a1ba738aac624).

     0test/validation_tests.cpp:68:88: warning: braces around scalar initializer [-Wbraced-scalar-init]
     1    BOOST_CHECK(signet_params->GetConsensus().signet_challenge == std::vector<uint8_t>{{OP_TRUE}});
     2                                                                                       ^~~~~~~~~
     3/usr/local/include/boost/test/tools/old/interface.hpp:83:6: note: expanded from macro 'BOOST_CHECK'
     4    (P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED, _ )
     5     ^
     6/usr/local/include/boost/test/tools/old/interface.hpp:68:61: note: expanded from macro 'BOOST_TEST_TOOL_IMPL'
     7        BOOST_JOIN( BOOST_TEST_TOOL_PASS_PRED, frwd_type )( P, ARGS ),          \
     8                                                            ^
     9/usr/local/include/boost/test/tools/old/interface.hpp:51:47: note: expanded from macro 'BOOST_TEST_TOOL_PASS_PRED2'
    10                                              ^
    111 warning generated.
    
  2. refactor: fix -Wbraced-scalar-init warning in validation tests
    Introduced in #20004 (fa29b5ae666bbb4c19188f0dcf8a1ba738aac624).
    
    ```bash
    test/validation_tests.cpp:68:88: warning: braces around scalar initializer [-Wbraced-scalar-init]
        BOOST_CHECK(signet_params->GetConsensus().signet_challenge == std::vector<uint8_t>{{OP_TRUE}});
                                                                                           ^~~~~~~~~
    /usr/local/include/boost/test/tools/old/interface.hpp:83:6: note: expanded from macro 'BOOST_CHECK'
        (P), BOOST_TEST_STRINGIZE( P ), CHECK, CHECK_PRED, _ )
         ^
    /usr/local/include/boost/test/tools/old/interface.hpp:68:61: note: expanded from macro 'BOOST_TEST_TOOL_IMPL'
            BOOST_JOIN( BOOST_TEST_TOOL_PASS_PRED, frwd_type )( P, ARGS ),          \
                                                                ^
    /usr/local/include/boost/test/tools/old/interface.hpp:51:47: note: expanded from macro 'BOOST_TEST_TOOL_PASS_PRED2'
                                                  ^
    1 warning generated.
    ```
    82b70f15c7
  3. fanquake added the label Refactoring on Oct 2, 2020
  4. practicalswift commented at 6:23 am on October 2, 2020: contributor
    ACK 82b70f15c72adc777bddc7ae7b1e359fb5daf1f1
  5. MarcoFalke commented at 6:37 am on October 2, 2020: member

    ACK 82b70f15c72adc777bddc7ae7b1e359fb5daf1f1

    Thx, not sure why I didn’t see this locally

  6. MarcoFalke merged this on Oct 2, 2020
  7. MarcoFalke closed this on Oct 2, 2020

  8. fanquake deleted the branch on Oct 2, 2020
  9. DrahtBot locked this on Feb 15, 2022

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: 2024-11-21 12:12 UTC

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