diff options
author | Christopher Jones <sixd@php.net> | 2013-08-14 20:43:25 -0700 |
---|---|---|
committer | Christopher Jones <sixd@php.net> | 2013-08-14 20:43:25 -0700 |
commit | 39612afc72623e89a2bc595c9be4be497568d1be (patch) | |
tree | ba336742c4b5ad3d4c8933748b91332f7436aa66 /ext/standard | |
parent | 8c61758dc772345636e436e3f69bef7323f8b339 (diff) | |
parent | 9ad97cd48903ea5454853960f2c14de326e0f624 (diff) | |
download | php-git-39612afc72623e89a2bc595c9be4be497568d1be.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
Conflicts:
ext/dba/libinifile/inifile.c
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/array.c | 9 | ||||
-rw-r--r-- | ext/standard/html.c | 6 | ||||
-rw-r--r-- | ext/standard/string.c | 4 | ||||
-rw-r--r-- | ext/standard/url_scanner_ex.re | 2 |
4 files changed, 10 insertions, 11 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 22873862f7..51972033ee 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -3030,8 +3030,8 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int char *param_spec; zend_fcall_info fci1, fci2; zend_fcall_info_cache fci1_cache = empty_fcall_info_cache, fci2_cache = empty_fcall_info_cache; - zend_fcall_info *fci_key, *fci_data; - zend_fcall_info_cache *fci_key_cache, *fci_data_cache; + zend_fcall_info *fci_key = NULL, *fci_data; + zend_fcall_info_cache *fci_key_cache = NULL, *fci_data_cache; PHP_ARRAY_CMP_FUNC_VARS; int (*intersect_key_compare_func)(const void *, const void * TSRMLS_DC); @@ -3448,8 +3448,8 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_ char *param_spec; zend_fcall_info fci1, fci2; zend_fcall_info_cache fci1_cache = empty_fcall_info_cache, fci2_cache = empty_fcall_info_cache; - zend_fcall_info *fci_key, *fci_data; - zend_fcall_info_cache *fci_key_cache, *fci_data_cache; + zend_fcall_info *fci_key = NULL, *fci_data; + zend_fcall_info_cache *fci_key_cache = NULL, *fci_data_cache; PHP_ARRAY_CMP_FUNC_VARS; int (*diff_key_compare_func)(const void *, const void * TSRMLS_DC); @@ -4053,7 +4053,6 @@ PHP_FUNCTION(array_sum) **entry, entry_n; HashPosition pos; - double dval; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &input) == FAILURE) { return; 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; diff --git a/ext/standard/string.c b/ext/standard/string.c index 6a67efbd7e..b9d7427eb9 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3204,7 +3204,7 @@ static void php_similar_str(const char *txt1, int len1, const char *txt2, int le static int php_similar_char(const char *txt1, int len1, const char *txt2, int len2) { int sum; - int pos1, pos2, max; + int pos1 = 0, pos2 = 0, max; php_similar_str(txt1, len1, txt2, len2, &pos1, &pos2, &max); if ((sum = max)) { @@ -4564,7 +4564,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow, char *tbuf, *buf, *p, *tp, *rp, c, lc; int br, i=0, depth=0, in_q = 0; int state = 0, pos; - char *allow_free; + char *allow_free = NULL; if (stateptr) state = *stateptr; diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index f0dee8ebc1..ecacb76f94 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -463,7 +463,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char * PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len, int urlencode TSRMLS_DC) { - char *encoded; + char *encoded = NULL; int encoded_len; smart_str val; |