diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index b533d213e..31af4738c 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -1513,7 +1513,7 @@ CheckedError Parser::SkipAnyJsonValue() { EXPECT(kTokenFloatConstant); break; default: - return Error(std::string("Unexpected token:") + std::string(1, token_)); + return Error(std::string("Unexpected token:") + std::string(1, static_cast(token_))); } return NoError(); } @@ -1522,7 +1522,7 @@ CheckedError Parser::SkipJsonObject() { EXPECT('{'); size_t fieldn = 0; - while (true) { + for (;;) { if ((!opts.strict_json || !fieldn) && Is('}')) break; if (!Is(kTokenStringConstant)) @@ -1543,7 +1543,7 @@ CheckedError Parser::SkipJsonObject() { CheckedError Parser::SkipJsonArray() { EXPECT('['); - while (true) { + for (;;) { if (Is(']')) break; ECHECK(SkipAnyJsonValue());