test: Fix -Wunused-function warnings if configured –without-libs #20180

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:201018-unused changing 1 files +30 −30
  1. hebasto commented at 4:10 pm on October 18, 2020: member

    On master (80c8a02f1b4f6ad2b5c02595d66a74db22373ed4) compiling with gcc:

     0$ ./configure --without-libs
     1$ make clean && make
     2...
     3test/script_tests.cpp:1369:23: warning: CScriptWitness script_tests::ScriptWitnessFromJSON(const UniValue&) defined but not used [-Wunused-function]
     4 1369 | static CScriptWitness ScriptWitnessFromJSON(const UniValue& univalue)
     5      |                       ^~~~~~~~~~~~~~~~~~~~~
     6test/script_tests.cpp:1357:28: warning: std::vector<CTxOut> script_tests::TxOutsFromJSON(const UniValue&) defined but not used [-Wunused-function]
     7 1357 | static std::vector<CTxOut> TxOutsFromJSON(const UniValue& univalue)
     8      |                            ^~~~~~~~~~~~~~
     9test/script_tests.cpp:1350:28: warning: CMutableTransaction script_tests::TxFromHex(const string&) defined but not used [-Wunused-function]
    10 1350 | static CMutableTransaction TxFromHex(const std::string& str)
    11      |                            ^~~~~~~~~
    12...
    

    This change is move-only (nice to review with git diff --color-moved).

  2. test: Fix -Wunused-function warning if configured --without-libs
    This is a move-only change.
    76bbcc414f
  3. DrahtBot added the label Tests on Oct 18, 2020
  4. hebasto renamed this:
    test: Fix -Wunused-function warning if configured --without-libs
    test: Fix -Wunused-function warnings if configured --without-libs
    on Oct 18, 2020
  5. hebasto commented at 6:01 pm on October 18, 2020: member
    This regression was introduced in 4567ba034c5ae6e6cc161360f7425c9e844738f0 (#19953).
  6. practicalswift commented at 9:03 pm on October 18, 2020: contributor
    ACK 76bbcc414f3001b16ac0101f738ed0b3e6f1a372: diff looks correct
  7. fanquake approved
  8. fanquake commented at 4:00 am on October 19, 2020: member
    ACK 76bbcc414f3001b16ac0101f738ed0b3e6f1a372 - verified that this fixes the warnings. As mentioned can be reviewed with git diff HEAD~ --color-moved=dimmed_zebra.
  9. MarcoFalke merged this on Oct 19, 2020
  10. MarcoFalke closed this on Oct 19, 2020

  11. hebasto deleted the branch on Oct 19, 2020
  12. sidhujag referenced this in commit 43ff41f050 on Oct 19, 2020
  13. 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-24 00:12 UTC

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