From 55251cf81d324f0dcdd74ac2c6d489317271aa9c Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 10 Jul 2007 17:31:08 +0000 Subject: Warning fixes svn path=/trunk/hubbub/; revision=3393 --- src/parser.c | 2 ++ test/tokeniser2.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3