Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Oct 18, 2020

On master (80c8a02) compiling with gcc:

$ ./configure --without-libs
$ make clean && make
...
test/script_tests.cpp:1369:23: warning: ‘CScriptWitness script_tests::ScriptWitnessFromJSON(const UniValue&)’ defined but not used [-Wunused-function]
 1369 | static CScriptWitness ScriptWitnessFromJSON(const UniValue& univalue)
      |                       ^~~~~~~~~~~~~~~~~~~~~
test/script_tests.cpp:1357:28: warning: ‘std::vector<CTxOut> script_tests::TxOutsFromJSON(const UniValue&)’ defined but not used [-Wunused-function]
 1357 | static std::vector<CTxOut> TxOutsFromJSON(const UniValue& univalue)
      |                            ^~~~~~~~~~~~~~
test/script_tests.cpp:1350:28: warning: ‘CMutableTransaction script_tests::TxFromHex(const string&)’ defined but not used [-Wunused-function]
 1350 | static CMutableTransaction TxFromHex(const std::string& str)
      |                            ^~~~~~~~~
...

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

@DrahtBot DrahtBot added the Tests label Oct 18, 2020
@hebasto hebasto changed the title test: Fix -Wunused-function warning if configured --without-libs test: Fix -Wunused-function warnings if configured --without-libs Oct 18, 2020
@hebasto
Copy link
Member Author

hebasto commented Oct 18, 2020

This regression was introduced in 4567ba0 (#19953).

@practicalswift
Copy link
Contributor

ACK 76bbcc4: diff looks correct

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 76bbcc4 - verified that this fixes the warnings. As mentioned can be reviewed with git diff HEAD~ --color-moved=dimmed_zebra.

@maflcko maflcko merged commit 152ddb3 into bitcoin:master Oct 19, 2020
@hebasto hebasto deleted the 201018-unused branch October 19, 2020 08:16
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 19, 2020
…ed --without-libs

76bbcc4 test: Fix -Wunused-function warning if configured --without-libs (Hennadii Stepanov)

Pull request description:

  On master (80c8a02) compiling with gcc:
  ```
  $ ./configure --without-libs
  $ make clean && make
  ...
  test/script_tests.cpp:1369:23: warning: ‘CScriptWitness script_tests::ScriptWitnessFromJSON(const UniValue&)’ defined but not used [-Wunused-function]
   1369 | static CScriptWitness ScriptWitnessFromJSON(const UniValue& univalue)
        |                       ^~~~~~~~~~~~~~~~~~~~~
  test/script_tests.cpp:1357:28: warning: ‘std::vector<CTxOut> script_tests::TxOutsFromJSON(const UniValue&)’ defined but not used [-Wunused-function]
   1357 | static std::vector<CTxOut> TxOutsFromJSON(const UniValue& univalue)
        |                            ^~~~~~~~~~~~~~
  test/script_tests.cpp:1350:28: warning: ‘CMutableTransaction script_tests::TxFromHex(const string&)’ defined but not used [-Wunused-function]
   1350 | static CMutableTransaction TxFromHex(const std::string& str)
        |                            ^~~~~~~~~
  ...
  ```

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

ACKs for top commit:
  practicalswift:
    ACK 76bbcc4: diff looks correct
  fanquake:
    ACK 76bbcc4 - verified that this fixes the warnings. As mentioned can be reviewed with `git diff HEAD~ --color-moved=dimmed_zebra`.

Tree-SHA512: 7799ac190d1e3f15e38b36cfcd1f8d138be80cab6c6cfad8f7828e07deffc2037d52f1d967f7f233a3a8ed74eee184f5275076c2f364c3e363c77a1f40aa5030
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants