From 9ad97cd48903ea5454853960f2c14de326e0f624 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 14 Aug 2013 20:36:50 -0700 Subject: Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. --- ext/standard/html.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/standard/html.c') diff --git a/ext/standard/html.c b/ext/standard/html.c index 414fa65c91..b4d9ba109d 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1221,8 +1221,8 @@ PHPAPI char *php_escape_html_entities_ex(unsigned char *old, size_t oldlen, size const enc_to_uni *to_uni_table = NULL; const entity_ht *inv_map = NULL; /* used for !double_encode */ /* only used if flags includes ENT_HTML_IGNORE_ERRORS or ENT_HTML_SUBSTITUTE_DISALLOWED_CHARS */ - const unsigned char *replacement; - size_t replacement_len; + const unsigned char *replacement = NULL; + size_t replacement_len = 0; if (all) { /* replace with all named entities */ if (CHARSET_PARTIAL_SUPPORT(charset)) { @@ -1596,7 +1596,7 @@ PHP_FUNCTION(get_html_translation_table) flags = ENT_COMPAT; int doctype; entity_table_opt entity_table; - const enc_to_uni *to_uni_table; + const enc_to_uni *to_uni_table = NULL; char *charset_hint = NULL; int charset_hint_len; enum entity_charset charset; -- cgit v1.2.1