Remove more implicit fallthrough compiler warnings

This commit is contained in:
chromatic 2021-09-01 20:52:06 -07:00
parent 16a2776ea8
commit 7a0b3034c7
4 changed files with 10 additions and 2 deletions

View File

@ -49,8 +49,10 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
switch (vDataToHash.size() & 3) {
case 3:
k1 ^= tail[2] << 16;
// Falls through
case 2:
k1 ^= tail[1] << 8;
// Falls through
case 1:
k1 ^= tail[0];
k1 *= c1;

View File

@ -268,7 +268,9 @@ bool RPCConsole::RPCParseCommandLine(std::string &strResult, const std::string &
}
if (breakParsing)
break;
}
// Falls through
case STATE_ARGUMENT: // In or after argument
case STATE_EATING_SPACES_IN_ARG:
case STATE_EATING_SPACES_IN_BRACKETS:
@ -374,6 +376,7 @@ bool RPCConsole::RPCParseCommandLine(std::string &strResult, const std::string &
strResult = lastResult.get_str();
else
strResult = lastResult.write(2);
// Falls through
case STATE_ARGUMENT:
case STATE_EATING_SPACES:
return true;

View File

@ -461,6 +461,7 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
std::vector<unsigned char> strRequestV = ParseHex(strRequestMutable);
strRequestMutable.assign(strRequestV.begin(), strRequestV.end());
}
// Falls through
case RF_BINARY: {
try {

View File

@ -666,9 +666,11 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
// Not exposed to GBT at all
break;
case THRESHOLD_LOCKED_IN:
// Ensure bit is set in block version
{
// Ensure bit is set in block version, then fall through to get vbavailable set
pblock->nVersion |= VersionBitsMask(consensusParams, pos);
// FALL THROUGH to get vbavailable set...
}
// Falls through
case THRESHOLD_STARTED:
{
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];