This commit is contained in:
shamprasadps 2017-12-23 20:09:49 +00:00 committed by GitHub
commit e4c289fb32

View File

@ -3250,6 +3250,20 @@ class parser
break; // LCOV_EXCL_LINE
}
case token_type::uninitialized:
case token_type::end_array:
case token_type::end_object:
case token_type::name_separator:
case token_type::value_separator:
case token_type::end_of_input:
case token_type::literal_or_value:
default:
{
// the last token was unexpected; we expected a value
@ -6298,6 +6312,11 @@ class serializer
o->write_characters("null", 4);
return;
}
default:
{
return;
}
}
}
@ -6563,7 +6582,7 @@ class serializer
// check that the additional bytes are present
assert(i + bytes < s.size());
// to use \uxxxx escaping, we first need to calculate
// to use \uxxxx escaping, we first need to calculate
// the codepoint from the UTF-8 bytes
int codepoint = 0;
@ -8113,6 +8132,8 @@ class basic_json
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
@ -8189,6 +8210,18 @@ class basic_json
break;
}
case value_t::null:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::discarded:
default:
{
break;