summaryrefslogtreecommitdiff
path: root/ext/bcmath/bcmath.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-10-30 14:36:57 +0100
committerAnatol Belski <ab@php.net>2014-10-30 20:06:47 +0100
commit88d2e43db3d372b6f0c7dea142d53be36af8622d (patch)
treed981fa3b661ea082b815d98862457bd0887def13 /ext/bcmath/bcmath.c
parent12fba83c488843393db8dd04112927e498dc5cf2 (diff)
downloadphp-git-88d2e43db3d372b6f0c7dea142d53be36af8622d.tar.gz
fix datatype mismatch warnings
Diffstat (limited to 'ext/bcmath/bcmath.c')
-rw-r--r--ext/bcmath/bcmath.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 7ef30cad5e..5c4e8740e4 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -209,14 +209,14 @@ PHP_FUNCTION(bcadd)
zend_long scale_param = 0;
bc_num first, second, result;
size_t left_len, right_len;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (argc == 3) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) (scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first TSRMLS_CC);
@@ -246,14 +246,14 @@ PHP_FUNCTION(bcsub)
size_t left_len, right_len;
zend_long scale_param = 0;
bc_num first, second, result;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (argc == 3) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first TSRMLS_CC);
@@ -283,14 +283,14 @@ PHP_FUNCTION(bcmul)
size_t left_len, right_len;
zend_long scale_param = 0;
bc_num first, second, result;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (argc == 3) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first TSRMLS_CC);
@@ -320,14 +320,14 @@ PHP_FUNCTION(bcdiv)
size_t left_len, right_len;
zend_long scale_param = 0;
bc_num first, second, result;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (argc == 3) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first TSRMLS_CC);
@@ -411,11 +411,11 @@ PHP_FUNCTION(bcpowmod)
php_str2num(&second, right TSRMLS_CC);
php_str2num(&mod, modulous TSRMLS_CC);
- scale_int = (int) ((int)scale < 0) ? 0 : scale;
+ scale_int = (int) ((int)scale < 0 ? 0 : scale);
if (bc_raisemod(first, second, mod, &result, scale_int TSRMLS_CC) != -1) {
if (result->n_scale > scale) {
- result->n_scale = scale;
+ result->n_scale = (int)scale;
}
RETVAL_STR(bc_num2str(result));
} else {
@@ -438,14 +438,14 @@ PHP_FUNCTION(bcpow)
size_t left_len, right_len;
zend_long scale_param = 0;
bc_num first, second, result;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (argc == 3) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first TSRMLS_CC);
@@ -475,14 +475,14 @@ PHP_FUNCTION(bcsqrt)
size_t left_len;
zend_long scale_param = 0;
bc_num result;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "s|l", &left, &left_len, &scale_param) == FAILURE) {
return;
}
if (argc == 2) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&result TSRMLS_CC);
@@ -510,14 +510,14 @@ PHP_FUNCTION(bccomp)
size_t left_len, right_len;
zend_long scale_param = 0;
bc_num first, second;
- int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
+ int scale = (int)BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (argc == 3) {
- scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
+ scale = (int) ((int)scale_param < 0 ? 0 : scale_param);
}
bc_init_num(&first TSRMLS_CC);