SIlence this warning on GCC9:
CXX interfaces/libbitcoin_server_a-chain.o
interfaces/chain.cpp: In member function ‘virtual std::unique_ptr<interfaces::Chain::Lock> interfaces::{anonymous}::ChainImpl::lock(bool)’:
interfaces/chain.cpp:243:25: warning: redundant move in return statement [-Wredundant-move]
243 | return std::move(result);
| ~~~~~~~~~^~~~~~~~
interfaces/chain.cpp:243:25: note: remove ‘std::move’ call
According to comment above this code, std::move() cannot be removed here, as is needed for some compilers, so silencing using GCC diagnostic pragmas is the only way.
"-Wpragmas" part is needed because on older compilers, like GCC7, you will have the following warning otherwise:
interfaces/chain.cpp: In member function 'virtual std::unique_ptr<interfaces::Chain::Lock> interfaces::{anonymous}::ChainImpl::lock(bool)':
interfaces/chain.cpp:244:32: warning: unknown option after '#pragma GCC diagnostic' kind [-Wpragmas]
#pragma GCC diagnostic ignored "-Wredundant-move"
^~~~~~~~~~~~~~~~~~