diff options
author | Dmitry Stogov <dmitry@zend.com> | 2016-06-22 00:40:50 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2016-06-22 00:40:50 +0300 |
commit | 323b2733f6b42d00dd86e77ac524d64f6ddc4e22 (patch) | |
tree | 49c72ac7d1e6077369f1de6a5d7a6d7847e51bf9 /ext/pdo | |
parent | 4ccbe03e445800d26aba5424a84e64e235f08ece (diff) | |
download | php-git-323b2733f6b42d00dd86e77ac524d64f6ddc4e22.tar.gz |
Fixed compilation warnings
Diffstat (limited to 'ext/pdo')
-rw-r--r-- | ext/pdo/pdo.c | 3 | ||||
-rw-r--r-- | ext/pdo/pdo_dbh.c | 4 | ||||
-rw-r--r-- | ext/pdo/pdo_sql_parser.c | 2 | ||||
-rw-r--r-- | ext/pdo/pdo_sql_parser.re | 2 | ||||
-rw-r--r-- | ext/pdo/pdo_sqlstate.c | 2 | ||||
-rw-r--r-- | ext/pdo/pdo_stmt.c | 18 |
6 files changed, 20 insertions, 11 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index c6b9ebdcdc..20f71491be 100644 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -190,7 +190,8 @@ pdo_driver_t *pdo_find_driver(const char *name, int namelen) /* {{{ */ PDO_API int php_pdo_parse_data_source(const char *data_source, zend_ulong data_source_len, struct pdo_data_src_parser *parsed, int nparams) /* {{{ */ { - int i, j; + zend_ulong i; + int j; int valstart = -1; int semi = -1; int optstart = 0; diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index ffb1b6ef03..c988a575fb 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1246,7 +1246,7 @@ const zend_function_entry pdo_dbh_functions[] = /* {{{ */ { PHP_ME(PDO, __wakeup, arginfo_pdo__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(PDO, __sleep, arginfo_pdo__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(PDO, getAvailableDrivers, arginfo_pdo__void, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - {NULL, NULL, NULL} + PHP_FE_END }; /* }}} */ @@ -1309,7 +1309,7 @@ int pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind) func.arg_info = (zend_internal_arg_info*)funcs->arg_info + 1; func.num_args = funcs->num_args; - if (info->required_num_args == -1) { + if (info->required_num_args == (uint32_t)-1) { func.required_num_args = funcs->num_args; } else { func.required_num_args = info->required_num_args; diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index 0095c3d8dc..573d5865a0 100644 --- a/ext/pdo/pdo_sql_parser.c +++ b/ext/pdo/pdo_sql_parser.c @@ -400,7 +400,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len Scanner s; char *ptr, *newbuffer; int t; - int bindno = 0; + uint32_t bindno = 0; int ret = 0; size_t newbuffer_len; HashTable *params; diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 3279b47056..20b9976850 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -86,7 +86,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len Scanner s; char *ptr, *newbuffer; int t; - int bindno = 0; + uint32_t bindno = 0; int ret = 0; size_t newbuffer_len; HashTable *params; diff --git a/ext/pdo/pdo_sqlstate.c b/ext/pdo/pdo_sqlstate.c index 24ed49b414..c40f8c1835 100644 --- a/ext/pdo/pdo_sqlstate.c +++ b/ext/pdo/pdo_sqlstate.c @@ -311,7 +311,7 @@ void pdo_sqlstate_fini_error_table(void) int pdo_sqlstate_init_error_table(void) { - int i; + size_t i; const struct pdo_sqlstate_info *info; zend_hash_init(&err_hash, sizeof(err_initializer)/sizeof(err_initializer[0]), NULL, NULL, 1); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index bd8a054718..2d57f9c8d4 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -551,7 +551,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ col = &stmt->columns[colno]; type = PDO_PARAM_TYPE(col->param_type); - new_type = type_override ? PDO_PARAM_TYPE(*type_override) : type; + new_type = type_override ? (int)PDO_PARAM_TYPE(*type_override) : type; value = NULL; value_len = 0; @@ -1537,10 +1537,11 @@ static PHP_METHOD(PDOStatement, fetchAll) static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int is_param) /* {{{ */ { - struct pdo_bound_param_data param = {{{0}}}; + struct pdo_bound_param_data param; zend_long param_type = PDO_PARAM_STR; zval *parameter, *driver_params = NULL; + memset(¶m, 0, sizeof(param)); param.paramno = -1; if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), @@ -1580,11 +1581,12 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, bind an input parameter to the value of a PHP variable. $paramno is the 1-based position of the placeholder in the SQL statement (but can be the parameter name for drivers that support named placeholders). It should be called prior to execute(). */ static PHP_METHOD(PDOStatement, bindValue) { - struct pdo_bound_param_data param = {{{0}}}; + struct pdo_bound_param_data param; zend_long param_type = PDO_PARAM_STR; zval *parameter; PHP_STMT_GET_OBJ; + memset(¶m, 0, sizeof(param)); param.paramno = -1; if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), @@ -2177,7 +2179,7 @@ const zend_function_entry pdo_dbstmt_functions[] = { PHP_ME(PDOStatement, debugDumpParams, arginfo_pdostatement__void, ZEND_ACC_PUBLIC) PHP_ME(PDOStatement, __wakeup, arginfo_pdostatement__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(PDOStatement, __sleep, arginfo_pdostatement__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - {NULL, NULL, NULL} + PHP_FE_END }; /* {{{ overloaded handlers for PDOStatement class */ @@ -2448,6 +2450,7 @@ static zend_object_iterator_funcs pdo_stmt_iter_funcs = { pdo_stmt_iter_get_data, pdo_stmt_iter_get_key, pdo_stmt_iter_move_forwards, + NULL, NULL }; @@ -2480,7 +2483,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int /* {{{ overloaded handlers for PDORow class (used by PDO_FETCH_LAZY) */ const zend_function_entry pdo_row_functions[] = { - {NULL, NULL, NULL} + PHP_FE_END }; static zval *row_prop_read(zval *object, zval *member, int type, void **cache_slot, zval *rv) @@ -2679,6 +2682,11 @@ zend_object_handlers pdo_row_object_handlers = { row_get_classname, row_compare, NULL, /* cast */ + NULL, + NULL, + NULL, + NULL, + NULL, NULL }; |