diff options
| author | Anatol Belski <ab@php.net> | 2014-10-31 18:41:41 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2014-10-31 19:36:18 +0100 |
| commit | a6ebaa142e9f2d184b5a64653ce9f2d19092b56f (patch) | |
| tree | 9d574500a8a32c7e138d7608e28056d7d11d3469 | |
| parent | e3934515c4535975df573ff3588b7e8ecbd86715 (diff) | |
| download | php-git-a6ebaa142e9f2d184b5a64653ce9f2d19092b56f.tar.gz | |
fix datatype mismatch warnings
| -rw-r--r-- | ext/mcrypt/mcrypt_filter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/mcrypt/mcrypt_filter.c b/ext/mcrypt/mcrypt_filter.c index 26f3dceba7..c36e9494e3 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; |
