mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-18 19:47:53 +02:00
Merge bitcoin/bitcoin#21430: build: Add -Werror=implicit-fallthrough compile flag
3c4c8e79babuild: Add -Werror=implicit-fallthrough compile flag (Hennadii Stepanov)014110c47dUse C++17 [[fallthrough]] attribute, and drop -Wno-implicit-fallthrough (Hennadii Stepanov) Pull request description: ACKs for top commit: fanquake: ACK3c4c8e79ba- looks ok to me now. Checked that warnings occur in our code & leveldb by removing a `[[fallthrough]]` or `FALLTHROUGH_INTENDED`. jarolrod: ACK3c4c8e79batheStack: ACK3c4c8e79baTree-SHA512: 4dce91f0f26b8a3de09bd92bb3d7e1995e078e3a8b3ff861c4fbf6c0b32b2327d063633b07b89c4aa94a1141d7f78d46d9d43ab8df865273e342693ad30645b6
This commit is contained in:
@@ -288,6 +288,7 @@ bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strRes
|
||||
}
|
||||
if (breakParsing)
|
||||
break;
|
||||
[[fallthrough]];
|
||||
}
|
||||
case STATE_ARGUMENT: // In or after argument
|
||||
case STATE_EATING_SPACES_IN_ARG:
|
||||
@@ -401,6 +402,7 @@ bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strRes
|
||||
strResult = lastResult.get_str();
|
||||
else
|
||||
strResult = lastResult.write(2);
|
||||
[[fallthrough]];
|
||||
case STATE_ARGUMENT:
|
||||
case STATE_EATING_SPACES:
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user