diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-05-14 10:45:04 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-05-14 10:45:24 -0400 |
commit | c5870ab689995e7dc1ada530e9db27cfae9bb448 (patch) | |
tree | 1d253eefe93c879191305cb32b07fd5202924f42 /src/rpc | |
parent | 682698970d453410fb2f7bd7eac060c0e63056f9 (diff) | |
parent | 159c32d1f111e6bad490bd23ae215462e8ba4374 (diff) |
Merge #12963: Fix Clang Static Analyzer warnings
159c32d1f1 Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance. (practicalswift)
fd447a6efe Fix dead stores. Values were stored but never read. Limit scope. (practicalswift)
Pull request description:
Fix Clang Static Analyzer warnings reported by @kallewoof in #12961:
* Fix dead stores. Values were stored but never read.
* Add assertion to guide static analyzers. See #12961 for details.
Tree-SHA512: 83dbec821f45217637316bee978e7543f2d2caeb7f7b0b3aec107fede0fff8baa756da8f6b761ae0d38537740839ac9752f6689109c38a4b05c0c041aaa3a1fb
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 45ec501b9d..203fac39e2 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -525,6 +525,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request) // Need to update only after we know CreateNewBlock succeeded pindexPrev = pindexPrevNew; } + assert(pindexPrev); CBlock* pblock = &pblocktemplate->block; // pointer for convenience const Consensus::Params& consensusParams = Params().GetConsensus(); |