test: Add {} to force default initialization #18976

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2005-testDefaultInit changing 1 files +1 −1
  1. MarcoFalke commented at 4:43 PM on May 14, 2020: member

    This is needed to be able to compile with clang 3.8

  2. test: Add {} to force default initialization fa02f2fc10
  3. MarcoFalke added the label Needs backport (0.20) on May 14, 2020
  4. MarcoFalke added the label Tests on May 14, 2020
  5. MarcoFalke added this to the milestone 0.20.0 on May 14, 2020
  6. MarcoFalke commented at 4:54 PM on May 14, 2020: member

    Steps to test on xenial:

    root@d911ea00680b:/bitcoin# clang --version
    clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
    root@d911ea00680b:/bitcoin# make 
    Making all in src
    make[1]: Entering directory '/bitcoin/src'
    make[2]: Entering directory '/bitcoin/src'
    make[3]: Entering directory '/bitcoin'
    make[3]: Leaving directory '/bitcoin'
      CXX      test/test_test_bitcoin-validationinterface_tests.o
    test/validationinterface_tests.cpp:26:36: error: default initialization of an object of const type 'const BlockValidationState' without a user-provided default constructor
            const BlockValidationState state_dummy;
                                       ^
                                                  {}
    1 error generated.
    Makefile:16809: recipe for target 'test/test_test_bitcoin-validationinterface_tests.o' failed
    make[2]: *** [test/test_test_bitcoin-validationinterface_tests.o] Error 1
    make[2]: Leaving directory '/bitcoin/src'
    Makefile:17084: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/bitcoin/src'
    Makefile:782: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    
    root@d911ea00680b:/bitcoin# git checkout fa02f2fc10fb33d49e3e31819f67f309ebf9aa38
    Note: checking out 'fa02f2fc10fb33d49e3e31819f67f309ebf9aa38'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:
    
      git checkout -b <new-branch-name>
    
    HEAD is now at fa02f2f... test: Add {} to force default initialization
    root@d911ea00680b:/bitcoin# 
    root@d911ea00680b:/bitcoin# make 
    Making all in src
    make[1]: Entering directory '/bitcoin/src'
    make[2]: Entering directory '/bitcoin/src'
    make[3]: Entering directory '/bitcoin'
    make[3]: Leaving directory '/bitcoin'
      CXX      libbitcoin_util_a-clientversion.o
      AR       libbitcoin_util.a
      CXXLD    bitcoind
      CXXLD    bitcoin-cli
      CXXLD    bitcoin-tx
      CXX      test/test_test_bitcoin-validationinterface_tests.o
      CXX      test/util/libtest_util_a-net.o
    
  7. MarcoFalke closed this on May 14, 2020

  8. MarcoFalke deleted the branch on May 14, 2020
  9. fanquake removed the label Needs backport (0.20) on May 15, 2020
  10. DrahtBot locked this on Feb 15, 2022
Contributors
Labels

Milestone
0.20.0


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-17 06:14 UTC

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