From: Antony Dovgal Date: Wed, 19 Jul 2006 06:57:21 +0000 (+0000) Subject: fix compile warnings X-Git-Tag: php-5.2.0RC1~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f61572e645392fb2dd3264a465a205c8274f29d8;p=php fix compile warnings --- diff --git a/ext/filter/filter.c b/ext/filter/filter.c index da4bb04c25..203f0c1667 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -323,7 +323,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int { zval new_var, raw_var; zval *array_ptr = NULL, *orig_array_ptr = NULL; - char *orig_var; + char *orig_var = NULL; int retval = 0; assert(*val != NULL); diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index f68d517386..fa352abf2c 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -41,6 +41,7 @@ #define FETCH_STRING_OPTION(var_name, option_name) \ var_name = NULL; \ var_name##_set = 0; \ + var_name##_len = 0; \ if (option_array) { \ if (zend_hash_find(HASH_OF(option_array), option_name, sizeof(option_name), (void **) &option_val) == SUCCESS) { \ convert_to_string(*option_val); \ @@ -248,7 +249,7 @@ void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ zval **option_val; char *decimal; - char dec_sep; + char dec_sep = '\0'; const char default_decimal[] = "."; int decimal_set, decimal_len; @@ -260,7 +261,7 @@ void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ int sign = 1; - double ret_val; + double ret_val = 0; double factor; int exp_value = 0, exp_multiply = 1; diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index 50d17eb65c..a9a672727b 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -67,7 +67,7 @@ static void php_filter_encode_html_high_low(zval *value, long flags) for (x = 0, y = 0; len--; x++, y++) { if (((flags & FILTER_FLAG_ENCODE_LOW) && (s[x] < 32)) || ((flags & FILTER_FLAG_ENCODE_HIGH) && (s[x] > 127))) { smart_str_appendl(&str, "&#", 2); - smart_str_append_long(&str, s[x]); + smart_str_append_unsigned(&str, s[x]); smart_str_appendc(&str, ';'); } else { smart_str_appendc(&str, s[x]);