From aea01d19789ffd6e256bffc1c7f714994a8170fb Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 29 Sep 2012 23:15:18 +0100 Subject: Fix to define variable at start of block, for GCC 2.95.2. --- render/html.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/render/html.c b/render/html.c index a4725cad1..b6515106e 100644 --- a/render/html.c +++ b/render/html.c @@ -423,6 +423,7 @@ html_process_encoding_change(struct content *c, const char *encoding; const char *source_data; unsigned long source_size; + union content_msg_data msg_data; /* Retrieve new encoding */ encoding = dom_hubbub_parser_get_encoding(html->parser, @@ -433,8 +434,6 @@ html_process_encoding_change(struct content *c, html->encoding = talloc_strdup(c, encoding); if (html->encoding == NULL) { - union content_msg_data msg_data; - msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -458,8 +457,6 @@ html_process_encoding_change(struct content *c, talloc_free(html->encoding); html->encoding = talloc_strdup(c, "Windows-1252"); if (html->encoding == NULL) { - union content_msg_data msg_data; - msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -474,8 +471,6 @@ html_process_encoding_change(struct content *c, &html->document); if (html->parser == NULL) { - union content_msg_data msg_data; - /** @todo add a message callback function and pass the * parser errors back instead of everything being * OOM @@ -500,8 +495,6 @@ html_process_encoding_change(struct content *c, return true; } - union content_msg_data msg_data; - msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); -- cgit v1.2.3