<p>These are not tests. They are simply warnings generated by the compiler indicating there <em>may</em> be an issue with the code being compiled.</p>

<p>Most likely, it's just being overzealous and the developers are aware of this.</p>

CC BY-SA 4.0
2019-09-02T18:38:29.723Z
2019-09-02T19:04:37.227Z
2019-09-02T19:04:37.227Z
Pieter Wuille
<p>That message mentions <code>-Wunused-function</code> which is a compiler flag that invokes testing for useless functions that are defined in the source code but not used anywhere in the project. See <a href="https://stackoverflow.com/questions/9091397/is-there-a-way-to-get-warned-about-unused-functions">stackoverflow</a></p>

<p>It may be that large numbers of these warnings arise for the ARM hardware architecture but not for x86 or x86-64 hardware architectures because of conditional compilation directives or for some similar reason.</p>

<p>You could probably disable <code>-Wunused-function</code> in the configuration file.</p>

CC BY-SA 4.0
2019-09-03T09:25:50.123Z
2019-09-03T09:25:50.123Z
RedGrittyBrick
<p>When installing <code>libbitcoin</code> from <a href="https://github.com/libbitcoin/libbitcoin-system#debianubuntu" rel="nofollow noreferrer">here</a> with <code>$ ./install.sh --prefix=/home/me/myprefix --build-boost --disable-shared</code> after most of the compilation is done there seem to be checks of the sourcecode with warnings like thise one: </p>

<pre><code>In file included from ./include/bitcoin/bitcoin/machine/operation.hpp:159:0,
                 from ./include/bitcoin/bitcoin/chain/script.hpp:31,
                 from ./include/bitcoin/bitcoin/chain/output.hpp:28,
                 from ./include/bitcoin/bitcoin/chain/output_point.hpp:25,
                 from ./include/bitcoin/bitcoin/chain/input.hpp:27,
                 from ./include/bitcoin/bitcoin/chain/transaction.hpp:30,
                 from ./include/bitcoin/bitcoin/chain/block.hpp:31,
                 from ./include/bitcoin/bitcoin.hpp:24,
                 from test/chain/transaction.cpp:20:
./include/bitcoin/bitcoin/impl/machine/operation.ipp:136:15: warning: ‘size_t libbitcoin::machine::variable_uint_size(uint64_t)’ defined but not used [-Wunused-function]
 static size_t variable_uint_size(uint64_t value)
               ^~~~~~~~~~~~~~~~~~
</code></pre>

<p>On my Raspberry Pi 2B this goes on for several hours now. Can someone explain why such a huge amount of tests would be usefull? </p>

<libbitcoin>
When installing libbitcoin there are checks of the code, why is this?
bomben
# When installing libbitcoin there are checks of the code, why is this?

(Asked by: username_0 on 2019-09-02)

When installing `libbitcoin` from [here](https://github.com/libbitcoin/libbitcoin-system#debianubuntu) with `$ ./install.sh --prefix=/home/me/myprefix --build-boost --disable-shared` after most of the compilation is done there seem to be checks of the sourcecode with warnings like thise one:

```
In file included from ./include/bitcoin/bitcoin/machine/operation.hpp:159:0,
                 from ./include/bitcoin/bitcoin/chain/script.hpp:31,
                 from ./include/bitcoin/bitcoin/chain/output.hpp:28,
                 from ./include/bitcoin/bitcoin/chain/output_point.hpp:25,
                 from ./include/bitcoin/bitcoin/chain/input.hpp:27,
                 from ./include/bitcoin/bitcoin/chain/transaction.hpp:30,
                 from ./include/bitcoin/bitcoin/chain/block.hpp:31,
                 from ./include/bitcoin/bitcoin.hpp:24,
                 from test/chain/transaction.cpp:20:
./include/bitcoin/bitcoin/impl/machine/operation.ipp:136:15: warning: ‘size_t libbitcoin::machine::variable_uint_size(uint64_t)’ defined but not used [-Wunused-function]
 static size_t variable_uint_size(uint64_t value)
               ^~~~~~~~~~~~~~~~~~

```

On my Raspberry Pi 2B this goes on for several hours now. Can someone explain why such a huge amount of tests would be usefull?

**Tags:** libbitcoin


---

## 2 answers

### Answer by username_1 on 2019-09-02. Score: 2 | Accepted answer

These are not tests. They are simply warnings generated by the compiler indicating there *may* be an issue with the code being compiled.

Most likely, it's just being overzealous and the developers are aware of this.


---

### Answer by username_2 on 2019-09-03. Score: 1

That message mentions `-Wunused-function` which is a compiler flag that invokes testing for useless functions that are defined in the source code but not used anywhere in the project. See [stackoverflow](https://stackoverflow.com/questions/9091397/is-there-a-way-to-get-warned-about-unused-functions)

It may be that large numbers of these warnings arise for the ARM hardware architecture but not for x86 or x86-64 hardware architectures because of conditional compilation directives or for some similar reason.

You could probably disable `-Wunused-function` in the configuration file.


---

