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 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: default:
{ {
// the last token was unexpected; we expected a value // the last token was unexpected; we expected a value
@ -6298,6 +6312,11 @@ class serializer
o->write_characters("null", 4); o->write_characters("null", 4);
return; return;
} }
default:
{
return;
}
} }
} }
@ -6563,7 +6582,7 @@ class serializer
// check that the additional bytes are present // check that the additional bytes are present
assert(i + bytes < s.size()); 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 // the codepoint from the UTF-8 bytes
int codepoint = 0; int codepoint = 0;
@ -8113,6 +8132,8 @@ class basic_json
break; break;
} }
case value_t::discarded:
default: default:
{ {
object = nullptr; // silence warning, see #821 object = nullptr; // silence warning, see #821
@ -8189,6 +8210,18 @@ class basic_json
break; 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: default:
{ {
break; break;