HomePhabricator

Fix -Wdeprecated-copy warning with GCC >= 9

Description

Fix -Wdeprecated-copy warning with GCC >= 9

Summary:

../src/psbt.cpp: In function 'bool CombinePSBTs(PartiallySignedTransaction&, TransactionError&, const std::vector<PartiallySignedTransaction>&)':
../src/psbt.cpp:214:19: warning: implicitly-declared 'PartiallySignedTransaction& PartiallySignedTransaction::operator=(const PartiallySignedTransaction&)' is deprecated [-Wdeprecated-copy]
  214 |     out = psbtxs[0];
      |                   ^
In file included from ../src/psbt.cpp:5:
../src/./psbt.h:327:5: note: because 'PartiallySignedTransaction' has user-provided 'PartiallySignedTransaction::PartiallySignedTransaction(const PartiallySignedTransaction&)'
  327 |     PartiallySignedTransaction(const PartiallySignedTransaction &psbt_in)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~

Test Plan:
With GCC >= 9:

ninja all check

Check the warning is gone.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5862

Details

Provenance
FabienAuthored on Apr 27 2020, 21:20
FabienPushed on Apr 28 2020, 06:48
Reviewer
Restricted Project
Differential Revision
D5862: Fix -Wdeprecated-copy warning with GCC >= 9
Parents
rABC78e4b0b55c00: [backport#15288] Remove uses of InitMessage/Warning/Error in wallet code
Branches
Unknown
Tags
Unknown