From a20e7b6842d95de535da4448bd4302dedf23d25d Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Sun, 12 Feb 2012 10:57:29 +0100 Subject: Fix some compiler warnings --- ifilter.c | 6 +++--- post_handler.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ifilter.c b/ifilter.c index efd2a6b..19f1457 100644 --- a/ifilter.c +++ b/ifilter.c @@ -146,7 +146,7 @@ static void suhosin_server_strip(HashTable *arr, char *key, int klen) if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS && Z_TYPE_PP(tzval) == IS_STRING) { - s = t = Z_STRVAL_PP(tzval); + s = t = (unsigned char *)Z_STRVAL_PP(tzval); for (; *t; t++) { if (suhosin_is_dangerous_char[*t]) { *t = '?'; @@ -168,7 +168,7 @@ static void suhosin_server_encode(HashTable *arr, char *key, int klen) if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS && Z_TYPE_PP(tzval) == IS_STRING) { - temp = Z_STRVAL_PP(tzval); + temp = (unsigned char *)Z_STRVAL_PP(tzval); t = temp; for (t = temp; *t; t++) { @@ -195,7 +195,7 @@ static void suhosin_server_encode(HashTable *arr, char *key, int klen) } *n = 0; - Z_STRVAL_PP(tzval) = newv; + Z_STRVAL_PP(tzval) = (char *)newv; Z_STRLEN_PP(tzval) = n-newv; } } diff --git a/post_handler.c b/post_handler.c index 96f4b4a..a36efb4 100644 --- a/post_handler.c +++ b/post_handler.c @@ -148,10 +148,10 @@ void suhosin_hook_post_handlers(TSRMLS_D) /* we need to tell suhosin patch that there is a new valid destructor */ /* therefore we have create HashTable that has this destructor */ - zend_hash_init(&tempht, 0, NULL, suhosin_post_handler_modification, 0); + zend_hash_init(&tempht, 0, NULL, (dtor_func_t)suhosin_post_handler_modification, 0); zend_hash_destroy(&tempht); /* And now we can overwrite the destructor for post entries */ - SG(known_post_content_types).pDestructor = suhosin_post_handler_modification; + SG(known_post_content_types).pDestructor = (dtor_func_t)suhosin_post_handler_modification; /* we have to stop mbstring from replacing our post handler */ if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) { -- cgit v1.3