]> granicus.if.org Git - php/commitdiff
fix compile warnings
authorAntony Dovgal <tony2001@php.net>
Wed, 19 Jul 2006 06:57:21 +0000 (06:57 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 19 Jul 2006 06:57:21 +0000 (06:57 +0000)
ext/filter/filter.c
ext/filter/logical_filters.c
ext/filter/sanitizing_filters.c

index da4bb04c25e1f783f7a4f7f667e19ddeec918e6d..203f0c16678d956a54641c9ce123c05e40db7d37 100644 (file)
@@ -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);
index f68d517386f337bcce7ed26aa898be0acee01689..fa352abf2c5ac45d5d730d2f6a91060002f234ba 100644 (file)
@@ -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;
index 50d17eb65c51902408847be0c022e12aa8a6c465..a9a672727bd740a2a51f3c4d4f7d179e0c38830c 100644 (file)
@@ -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]);