Page MenuHomePhabricator

Fix -Wdeprecated-copy warning with GCC >= 9
ClosedPublic

Authored by Fabien on Apr 27 2020, 21:30.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_deprecated_copy_warning
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 10439
Build 18699: Default Diff Build & Tests
Build 18698: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 27 2020, 22:27
This revision was automatically updated to reflect the committed changes.