Merge pull request #3492 from parnic/fix-vs2012-warnings

Fix vs2012 warnings
This commit is contained in:
Wouter van Oortmerssen 2016-01-06 09:39:23 -08:00
commit 56f9b2d142
1 changed files with 3 additions and 3 deletions

View File

@ -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<char>(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());