Fix -Wunreachable-code-aggressive in json_reader.cc (#27051)

Bug: chromium:1066980
pull/27007/head
Nico Weber 3 years ago committed by GitHub
parent ac0f51e0c8
commit 40ab21d9ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/core/lib/json/json_reader.cc

@ -279,10 +279,8 @@ JsonReader::Status JsonReader::Run() {
case GRPC_JSON_READ_CHAR_EOF:
if (IsComplete()) {
return Status::GRPC_JSON_DONE;
} else {
return Status::GRPC_JSON_PARSE_ERROR;
}
break;
return Status::GRPC_JSON_PARSE_ERROR;
/* Processing whitespaces. */
case ' ':
@ -341,7 +339,6 @@ JsonReader::Status JsonReader::Run() {
} else if (c == '}' &&
stack_.back()->type() != Json::Type::OBJECT) {
return Status::GRPC_JSON_PARSE_ERROR;
return Status::GRPC_JSON_PARSE_ERROR;
} else if (c == ']' && stack_.back()->type() != Json::Type::ARRAY) {
return Status::GRPC_JSON_PARSE_ERROR;
}

Loading…
Cancel
Save