com php-src: fix datatype mismatch warnings: ext/mcrypt/mcrypt _filter.c
| From: | Anatol Belski | Date: | Fri, 31 Oct 2014 18:36:18 +0000 |
| Subject: | com php-src: fix datatype mismatch warnings: ext/mcrypt/mcrypt _filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82921@lists.php.net to get a copy of this message | ||
Commit: a6ebaa142e9f2d184b5a64653ce9f2d19092b56f
Author: Anatol Belski <ab@php.net> Fri, 31 Oct 2014 18:41:41 +0100
Parents: e3934515c4535975df573ff3588b7e8ecbd86715
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a6ebaa142e9f2d184b5a64653ce9f2d19092b56f
Log:
fix datatype mismatch warnings
Changed paths:
M ext/mcrypt/mcrypt_filter.c
Diff:
diff --git a/ext/mcrypt/mcrypt_filter.c b/ext/mcrypt/mcrypt_filter.c
index 26f3dce..c36e949 100644
--- a/ext/mcrypt/mcrypt_filter.c
+++ b/ext/mcrypt/mcrypt_filter..c
@@ -60,7 +60,7 @@ static php_stream_filter_status_t php_mcrypt_filter(
if (data->blocksize) {
/* Blockmode cipher */
char *outchunk;
- int chunklen = bucket->buflen + data->block_used, n;
+ int chunklen = (int)(bucket->buflen + data->block_used), n;
php_stream_bucket *newbucket;
outchunk = pemalloc(chunklen, data->persistent);
@@ -91,9 +91,9 @@ static php_stream_filter_status_t php_mcrypt_filter(
/* Stream cipher */
php_stream_bucket_make_writeable(bucket TSRMLS_CC);
if (data->encrypt) {
- mcrypt_generic(data->module, bucket->buf, bucket->buflen);
+ mcrypt_generic(data->module, bucket->buf, (int)bucket->buflen);
} else {
- mdecrypt_generic(data->module, bucket->buf, bucket->buflen);
+ mdecrypt_generic(data->module, bucket->buf, (int)bucket->buflen);
}
php_stream_bucket_append(buckets_out, bucket TSRMLS_CC);
@@ -201,13 +201,13 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername,
zval
if ((tmpzval = zend_hash_str_find(HASH_OF(filterparams), ZEND_STRL("key"))) &&
Z_TYPE_P(tmpzval) == IS_STRING) {
key = Z_STRVAL_P(tmpzval);
- key_len = Z_STRLEN_P(tmpzval);
+ key_len = (int)Z_STRLEN_P(tmpzval);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "key not specified or is not a string");
return NULL;
}
- mcrypt_module = mcrypt_module_open(cipher, algo_dir, mode, mode_dir);
+ mcrypt_module = mcrypt_module_open((char *)cipher, algo_dir, mode, mode_dir);
if (mcrypt_module == MCRYPT_FAILED) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not open encryption module");
return NULL;