From 8002e2c06a58e7fbe3f6d47ee9602c85d45c12b0 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 5 Sep 2014 09:31:05 +0800 Subject: [PATCH] Fixed discards qualifiers from pointer target type --- ext/curl/interface.c | 4 ++-- ext/iconv/iconv.c | 2 +- ext/sockets/conversions.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index d3e26bfe17..d8e084796d 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2534,11 +2534,11 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue TSRMLS_ "The usage of the @filename API for file uploading is deprecated. Please use the CURLFile class instead"); name = estrndup(postval, Z_STRLEN_P(current)); - if ((type = php_memnstr(name, ";type=", sizeof(";type=") - 1, + if ((type = (char *)php_memnstr(name, ";type=", sizeof(";type=") - 1, name + Z_STRLEN_P(current)))) { *type = '\0'; } - if ((filename = php_memnstr(name, ";filename=", sizeof(";filename=") - 1, + if ((filename = (char *)php_memnstr(name, ";filename=", sizeof(";filename=") - 1, name + Z_STRLEN_P(current)))) { *filename = '\0'; } diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 66b696950e..e1bf9deede 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2407,7 +2407,7 @@ PHP_FUNCTION(iconv_mime_decode_headers) } } enc_str_len_tmp -= next_pos - enc_str_tmp; - enc_str_tmp = next_pos; + enc_str_tmp = (char *)next_pos; smart_str_free(&decoded_header); } diff --git a/ext/sockets/conversions.c b/ext/sockets/conversions.c index ec66c9d0e0..1ccf789041 100644 --- a/ext/sockets/conversions.c +++ b/ext/sockets/conversions.c @@ -310,7 +310,7 @@ static zend_long from_zval_integer_common(const zval *arr_value, ser_context *ct ZVAL_NULL(&lzval); if (Z_TYPE_P(arr_value) != IS_LONG) { - ZVAL_COPY(&lzval, arr_value); + ZVAL_COPY(&lzval, (zval *)arr_value); arr_value = &lzval; } @@ -545,7 +545,7 @@ static void from_zval_write_sin_addr(const zval *zaddr_str, char *inaddr, ser_co ZVAL_NULL(&lzval); if (Z_TYPE_P(zaddr_str) != IS_STRING) { - ZVAL_COPY(&lzval, zaddr_str); + ZVAL_COPY(&lzval, (zval *)zaddr_str); convert_to_string(&lzval); zaddr_str = &lzval; } @@ -602,7 +602,7 @@ static void from_zval_write_sin6_addr(const zval *zaddr_str, char *addr6, ser_co ZVAL_NULL(&lzval); if (Z_TYPE_P(zaddr_str) != IS_STRING) { - ZVAL_COPY(&lzval, zaddr_str); + ZVAL_COPY(&lzval, (zval *)zaddr_str); convert_to_string(&lzval); zaddr_str = &lzval; } @@ -661,7 +661,7 @@ static void from_zval_write_sun_path(const zval *path, char *sockaddr_un_c, ser_ ZVAL_NULL(&lzval); if (Z_TYPE_P(path) != IS_STRING) { - ZVAL_COPY(&lzval, path); + ZVAL_COPY(&lzval, (zval *)path); convert_to_string(&lzval); path = &lzval; } @@ -1266,7 +1266,7 @@ static void from_zval_write_ifindex(const zval *zv, char *uinteger, ser_context } } else { if (Z_TYPE_P(zv) != IS_STRING) { - ZVAL_COPY_VALUE(&lzval, zv); + ZVAL_COPY_VALUE(&lzval, (zval *)zv); zval_copy_ctor(&lzval); convert_to_string(&lzval); zv = &lzval; -- 2.50.1