summaryrefslogtreecommitdiff
path: root/ext/filter
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2015-01-30 19:54:46 +0100
committerMichael Wallner <mike@php.net>2015-01-30 19:54:46 +0100
commitf6508f9fa2b10747c4176c007cbe4e14297c09a3 (patch)
tree07e76c93b3c12e9cc8fc7b3b31b8c28891eccfb2 /ext/filter
parent34710ddc59f38de4ea0cffaca60d3ac8f4692bfd (diff)
downloadphp-git-f6508f9fa2b10747c4176c007cbe4e14297c09a3.tar.gz
fix warnings
Diffstat (limited to 'ext/filter')
-rw-r--r--ext/filter/logical_filters.c4
-rw-r--r--ext/filter/sanitizing_filters.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c
index 91ab756e97..ab13ce52f9 100644
--- a/ext/filter/logical_filters.c
+++ b/ext/filter/logical_filters.c
@@ -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");
diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c
index d9cb7baeb7..f786f29ce7 100644
--- a/ext/filter/sanitizing_filters.c
+++ b/ext/filter/sanitizing_filters.c
@@ -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);
}