diff options
author | George Peter Banyard <girgias@php.net> | 2020-05-20 15:41:13 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-05-20 16:29:52 +0200 |
commit | c932cc841ab1bd80dbb1465f29d58302c95e8c78 (patch) | |
tree | 0d75ec3917bb58c6b4f73f81bead5f49a672a8b8 /ext/pdo_mysql/mysql_statement.c | |
parent | db7dc2fa2fdea20a70f1a45c2e05988579398d7a (diff) | |
download | php-git-c932cc841ab1bd80dbb1465f29d58302c95e8c78.tar.gz |
Fix [-Wundef] warning in PDO MySQL extension
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rw-r--r-- | ext/pdo_mysql/mysql_statement.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index e99a11c715..591443520f 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -100,7 +100,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */ } } -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (!S->stmt && S->current_data) { mnd_free(S->current_data); } @@ -339,13 +339,13 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */ { pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; pdo_mysql_db_handle *H = S->H; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND zend_long row_count; #endif PDO_DBG_ENTER("pdo_mysql_stmt_next_rowset"); PDO_DBG_INF_FMT("stmt=%p", S->stmt); -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (!H->emulate_prepare) { if (!mysqlnd_stmt_more_results(S->stmt)) { PDO_DBG_RETURN(0); @@ -416,7 +416,7 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt) /* {{{ */ /* No more results */ PDO_DBG_RETURN(0); } -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (mysql_next_result(H->server) == FAIL) { pdo_mysql_error_stmt(stmt); PDO_DBG_RETURN(0); @@ -491,7 +491,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da parameter = Z_REFVAL(param->parameter); } -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_NULL || (Z_TYPE_P(parameter) == IS_NULL)) { mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_NULL); PDO_DBG_RETURN(1); @@ -537,7 +537,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da ; } -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND /* Is it really correct to check the zval's type? - But well, that's what the old code below does, too */ PDO_DBG_INF_FMT("param->parameter->type=%d", Z_TYPE(param->parameter)); if (!Z_ISREF(param->parameter)) { @@ -614,7 +614,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, zend_long offset) /* {{{ */ { pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND zend_bool fetched_anything; PDO_DBG_ENTER("pdo_mysql_stmt_fetch"); @@ -653,14 +653,14 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori strcpy(stmt->error_code, "HY000"); PDO_DBG_RETURN(0); } -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (!S->stmt && S->current_data) { mnd_free(S->current_data); } #endif /* PDO_USE_MYSQLND */ if ((S->current_data = mysql_fetch_row(S->result)) == NULL) { -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (S->result->unbuf && !S->result->unbuf->eof_reached && mysql_errno(S->H->server)) { #else if (!S->result->eof && mysql_errno(S->H->server)) { @@ -743,7 +743,7 @@ static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, size_ /* error invalid column */ PDO_DBG_RETURN(0); } -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND if (S->stmt) { Z_TRY_ADDREF(S->stmt->data->result_bind[colno].zv); *ptr = (char*)&S->stmt->data->result_bind[colno].zv; |