initialize var to avoid undefined return val

pull/10555/head
Joshua Humphries 2 years ago committed by GitHub
parent d6acffba7b
commit 0362a1204f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/google/protobuf/io/tokenizer.cc

@ -1002,7 +1002,7 @@ bool Tokenizer::ParseInteger(const std::string& text, uint64_t max_value,
} }
double Tokenizer::ParseFloat(const std::string& text) { double Tokenizer::ParseFloat(const std::string& text) {
double result; double result = 0;
if (!TryParseFloat(text, &result)) { if (!TryParseFloat(text, &result)) {
LOG(DFATAL) LOG(DFATAL)
<< " Tokenizer::ParseFloat() passed text that could not have been" << " Tokenizer::ParseFloat() passed text that could not have been"

Loading…
Cancel
Save