build: Disable deprecated-copy warning only when external warnings are enabled#22258
Merged
fanquake merged 1 commit intobitcoin:masterfrom Jun 17, 2021
Merged
Conversation
Member
Author
|
Tested warnings-free on Focal with:
Also tested on Fedora 34 with clang and gcc. |
Member
Author
|
@fanquake (or someone else) Can you test this one please: #18738 (comment) |
Contributor
|
Concept ACK |
fanquake
reviewed
Jun 16, 2021
fa9824c to
1111457
Compare
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Subawit
approved these changes
Jun 17, 2021
fanquake
approved these changes
Jun 17, 2021
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Jun 18, 2021
… external warnings are enabled 1111457 build: Disable deprecated-copy warning only when external warnings are enabled (MarcoFalke) Pull request description: Fixes bitcoin#18967 Alternative to bitcoin#22240 ACKs for top commit: fanquake: tACK 1111457 Tree-SHA512: 0fc826f26ebbeab662fa7eed2a5cc1630c6c4e612deb91734885fc8bae0352be657ec48ae94ff55a984ac36d27b95cea8d947cc5cf408231d56addecf79db83f
Contributor
|
According to Clang 13.0.0 we have cc @ajtowns the below fixes it: diff --git i/src/policy/rbf.cpp w/src/policy/rbf.cpp
index 8125b41c41..10859d256d 100644
--- i/src/policy/rbf.cpp
+++ w/src/policy/rbf.cpp
@@ -23,13 +23,13 @@ RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool)
}
// If all the inputs have nSequence >= maxint-1, it still might be
// signaled for RBF if any unconfirmed parents have signaled.
uint64_t noLimit = std::numeric_limits<uint64_t>::max();
std::string dummy;
- CTxMemPoolEntry entry = *pool.mapTx.find(tx.GetHash());
+ const CTxMemPoolEntry& entry = *pool.mapTx.find(tx.GetHash());
pool.CalculateMemPoolAncestors(entry, setAncestors, noLimit, noLimit, noLimit, noLimit, dummy, false);
for (CTxMemPool::txiter it : setAncestors) {
if (SignalsOptInRBF(it->GetTx())) {
return RBFTransactionState::REPLACEABLE_BIP125;
}
diff --git i/src/util/epochguard.h w/src/util/epochguard.h
index 1570ec4eb4..79c0abb4eb 100644
--- i/src/util/epochguard.h
+++ w/src/util/epochguard.h
@@ -42,12 +42,16 @@ public:
Epoch& operator=(const Epoch&) = delete;
bool guarded() const { return m_guarded; }
class Marker
{
+ public:
+ Marker() = default;
+ Marker(const Marker& other) = default;
+
private:
uint64_t m_marker = 0;
// only allow modification via Epoch member functions
friend class Epoch;
Marker& operator=(const Marker&) = delete; |
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jul 1, 2021
… external warnings are enabled 1111457 build: Disable deprecated-copy warning only when external warnings are enabled (MarcoFalke) Pull request description: Fixes bitcoin#18967 Alternative to bitcoin#22240 ACKs for top commit: fanquake: tACK 1111457 Tree-SHA512: 0fc826f26ebbeab662fa7eed2a5cc1630c6c4e612deb91734885fc8bae0352be657ec48ae94ff55a984ac36d27b95cea8d947cc5cf408231d56addecf79db83f
gwillen
pushed a commit
to ElementsProject/elements
that referenced
this pull request
Jun 1, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #18967
Alternative to #22240