summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.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
commit87edd143edef1ad072550d609c1427ad2c835a86 (patch)
tree60aed0c929cefab2799f8819811d81ed366497ae /ext/mysqli/mysqli_api.c
parentdf2261df2a915d0355b16c66b3c3a9496d8cab43 (diff)
downloadphp-git-87edd143edef1ad072550d609c1427ad2c835a86.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_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 6ce166713e..841f00f591 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1047,11 +1047,11 @@ PHP_FUNCTION(mysqli_stmt_fetch)
/* {{{ php_add_field_properties */
static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRMLS_DC)
{
- add_property_string(value, "name",(field->name ? field->name : ""), 1);
- add_property_string(value, "orgname",(field->org_name ? field->org_name : ""), 1);
- add_property_string(value, "table",(field->table ? field->table : ""), 1);
- add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1);
- add_property_string(value, "def",(field->def ? field->def : ""), 1);
+ add_property_string(value, "name", (char *) (field->name ? field->name : ""), 1);
+ add_property_string(value, "orgname", (char *) (field->org_name ? field->org_name : ""), 1);
+ add_property_string(value, "table", (char *) (field->table ? field->table : ""), 1);
+ add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1);
+ add_property_string(value, "def", (field->def ? field->def : ""), 1);
add_property_long(value, "max_length", field->max_length);
add_property_long(value, "length", field->length);