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

Bug: chromium:1066980
pull/27007/head
Nico Weber 4 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: case GRPC_JSON_READ_CHAR_EOF:
if (IsComplete()) { if (IsComplete()) {
return Status::GRPC_JSON_DONE; return Status::GRPC_JSON_DONE;
} else {
return Status::GRPC_JSON_PARSE_ERROR;
} }
break; return Status::GRPC_JSON_PARSE_ERROR;
/* Processing whitespaces. */ /* Processing whitespaces. */
case ' ': case ' ':
@ -341,7 +339,6 @@ JsonReader::Status JsonReader::Run() {
} else if (c == '}' && } else if (c == '}' &&
stack_.back()->type() != Json::Type::OBJECT) { stack_.back()->type() != Json::Type::OBJECT) {
return Status::GRPC_JSON_PARSE_ERROR; return Status::GRPC_JSON_PARSE_ERROR;
return Status::GRPC_JSON_PARSE_ERROR;
} else if (c == ']' && stack_.back()->type() != Json::Type::ARRAY) { } else if (c == ']' && stack_.back()->type() != Json::Type::ARRAY) {
return Status::GRPC_JSON_PARSE_ERROR; return Status::GRPC_JSON_PARSE_ERROR;
} }

Loading…
Cancel
Save