summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_prop.c
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2010-10-05 09:40:36 +0000
committerKalle Sommer Nielsen <kalle@php.net>2010-10-05 09:40:36 +0000
commitcc1eaba454145888b15be9537af5b9aea019af96 (patch)
tree424924ab959f2614239a6af5d183b5c74467f0ae /ext/mysqli/mysqli_prop.c
parenta3f2895e6774430c8d085e7c1377675c7b5b35d3 (diff)
downloadphp-git-cc1eaba454145888b15be9537af5b9aea019af96.tar.gz
Fixed compiler warnings in mysqli
- mysqli.c: Fix unused variables, they are only used in non-mysqlnd mode - mysqli_api.c (PHP_5_3 only): Fix constness, add_property_string expects a char *, not a const char * - mysqli_prop.c: Cast to long, as its below the LONG_MAX and therefore safe - mysqli_result_iterator.c: Cast to ulong as the iterator member expects that rather than a my_longlong # In trunk only warnings regarding the zend_property_info # structure is present and PHP_5_3 is warning free now
Diffstat (limited to 'ext/mysqli/mysqli_prop.c')
-rw-r--r--ext/mysqli/mysqli_prop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c
index 98b81ee04a..b4535654fb 100644
--- a/ext/mysqli/mysqli_prop.c
+++ b/ext/mysqli/mysqli_prop.c
@@ -84,7 +84,7 @@ static int __func(mysqli_object *obj, zval **retval TSRMLS_DC) \
} else {\
l = (__ret_type)__int_func(p);\
if (l < LONG_MAX) {\
- ZVAL_LONG(*retval, l);\
+ ZVAL_LONG(*retval, (long) l);\
} else { \
char *ret; \
int ret_len = spprintf(&ret, 0, __ret_type_sprint_mod, l); \
@@ -178,7 +178,7 @@ static int link_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
}
if (rc < LONG_MAX) {
- ZVAL_LONG(*retval, rc);
+ ZVAL_LONG(*retval, (long) rc);
} else {
char *ret;
int l = spprintf(&ret, 0, MYSQLI_LLU_SPEC, rc);
@@ -295,7 +295,7 @@ static int stmt_affected_rows_read(mysqli_object *obj, zval **retval TSRMLS_DC)
}
if (rc < LONG_MAX) {
- ZVAL_LONG(*retval, rc);
+ ZVAL_LONG(*retval, (long) rc);
} else {
char *ret;
int l = spprintf(&ret, 0, MYSQLI_LLU_SPEC, rc);