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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user