diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-08-28 15:28:57 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-08-28 15:30:50 +0200 |
| commit | 8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f (patch) | |
| tree | ef7fed85ea38dde8929f15e02ff39c7e7b40da4a /src/main.h | |
| parent | qt/splashscreen: #include version.h (diff) | |
| download | discoin-8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f.tar.xz discoin-8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f.zip | |
Fix a few "Uninitialized scalar field" warnings
Fix a few warnings reported by Coverity.
None of these is critical, but making sure that class fields are
initialized can avoid heisenbugs.
Diffstat (limited to 'src/main.h')
| -rw-r--r-- | src/main.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.h b/src/main.h index 0a1ff4546..3160b28c4 100644 --- a/src/main.h +++ b/src/main.h @@ -328,7 +328,7 @@ private: int nHashType; public: - CScriptCheck() {} + CScriptCheck(): ptxTo(0), nIn(0), nFlags(0), nHashType(0) {} CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, int nHashTypeIn) : scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey), ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), nHashType(nHashTypeIn) { } @@ -876,7 +876,7 @@ private: unsigned char chRejectCode; bool corruptionPossible; public: - CValidationState() : mode(MODE_VALID), nDoS(0), corruptionPossible(false) {} + CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {} bool DoS(int level, bool ret = false, unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="", bool corruptionIn=false) { |