summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parser.c2
-rw-r--r--test/tokeniser2.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c
index e7a4fe8..258067f 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -108,6 +108,8 @@ hubbub_error hubbub_parser_setopt(hubbub_parser *parser,
case HUBBUB_PARSER_CONTENT_MODEL:
toktype = HUBBUB_TOKENISER_CONTENT_MODEL;
break;
+ default:
+ return HUBBUB_INVALID;
}
return hubbub_tokeniser_setopt(parser->tok, toktype,
diff --git a/test/tokeniser2.c b/test/tokeniser2.c
index 06340fb..103a3d5 100644
--- a/test/tokeniser2.c
+++ b/test/tokeniser2.c
@@ -226,7 +226,7 @@ void token_handler(const hubbub_token *token, void *pw)
};
size_t i;
context *ctx = (context *) pw;
- struct json_object *obj;
+ struct json_object *obj = NULL;
struct array_list *items;
for (; ctx->output_index < array_list_length(ctx->output);