]> granicus.if.org Git - php/commitdiff
fix warnings
authorMichael Wallner <mike@php.net>
Fri, 30 Jan 2015 18:54:46 +0000 (19:54 +0100)
committerMichael Wallner <mike@php.net>
Fri, 30 Jan 2015 18:54:46 +0000 (19:54 +0100)
ext/filter/logical_filters.c
ext/filter/sanitizing_filters.c

index 91ab756e974fdbeb0ed061ceeff0cca4bb76f807..ab13ce52f995837bb6dac146eecc68ffae2ff18c 100644 (file)
@@ -427,8 +427,7 @@ void php_filter_validate_regexp(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
 {
        zval *option_val;
        zend_string *regexp;
-       zend_long option_flags;
-       int regexp_set, option_flags_set;
+       int regexp_set;
        pcre *re = NULL;
        pcre_extra *pcre_extra = NULL;
        int preg_options = 0;
@@ -437,7 +436,6 @@ void php_filter_validate_regexp(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
 
        /* Parse options */
        FETCH_STR_OPTION(regexp, "regexp");
-       FETCH_LONG_OPTION(option_flags, "flags");
 
        if (!regexp_set) {
                php_error_docref(NULL, E_WARNING, "'regexp' option missing");
index d9cb7baeb79e17bce5284b3a31b30d0c3451c3f7..f786f29ce767f56a49fe8313d661925741a2d479 100644 (file)
@@ -88,8 +88,8 @@ static void php_filter_encode_url(zval *value, const unsigned char* chars, const
        }
 */
        str = zend_string_alloc(3 * Z_STRLEN_P(value), 0);
-       p = str->val;
-       s = Z_STRVAL_P(value);
+       p = (unsigned char *) str->val;
+       s = (unsigned char *) Z_STRVAL_P(value);
        e = s + Z_STRLEN_P(value);
 
        while (s < e) {
@@ -264,7 +264,7 @@ void php_filter_full_special_chars(PHP_INPUT_FILTER_PARAM_DECL)
        } else {
                quotes = ENT_NOQUOTES;
        }
-       buf = php_escape_html_entities_ex(Z_STRVAL_P(value), Z_STRLEN_P(value), 1, quotes, SG(default_charset), 0);
+       buf = php_escape_html_entities_ex((unsigned char *) Z_STRVAL_P(value), Z_STRLEN_P(value), 1, quotes, SG(default_charset), 0);
        zval_ptr_dtor(value);
        ZVAL_STR(value, buf);
 }