From: Felipe Pena Date: Sat, 22 Mar 2008 20:37:08 +0000 (+0000) Subject: - Fixed compilation warnings X-Git-Tag: RELEASE_2_0_0a1~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b859ca7770037dbb0cade235b3ba3d3f7f419822;p=php - Fixed compilation warnings --- diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 08fa14c81e..815c3d400c 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -205,7 +205,7 @@ safe: size_t len; char *buf = NULL; - len = php_stream_copy_to_mem(stm, &buf, PHP_STREAM_COPY_ALL, 0); + len = php_stream_copy_to_mem(stm, (void *)&buf, PHP_STREAM_COPY_ALL, 0); if (!stmt->dbh->methods->quoter(stmt->dbh, buf, len, &plc->quoted, &plc->qlen, param->param_type TSRMLS_CC)) { /* bork */ diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 7bd175c98b..0efbd68731 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -127,7 +127,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d SEPARATE_ZVAL(¶m->parameter); Z_TYPE_P(param->parameter) = IS_STRING; Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm, - &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); + (void *)&Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0); } else { pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource" TSRMLS_CC); return 0; diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c index 16932e381f..784b4ff732 100644 --- a/ext/sqlite/pdo_sqlite2.c +++ b/ext/sqlite/pdo_sqlite2.c @@ -374,7 +374,7 @@ static long sqlite2_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TS } } -static char *pdo_sqlite2_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned int *len TSRMLS_DC) +static char *pdo_sqlite2_last_insert_id(pdo_dbh_t *dbh, const char *name, int *len TSRMLS_DC) { pdo_sqlite2_db_handle *H = (pdo_sqlite2_db_handle *)dbh->driver_data; char *id; @@ -515,7 +515,8 @@ static struct pdo_dbh_methods sqlite2_methods = { pdo_sqlite2_fetch_error_func, pdo_sqlite2_get_attribute, NULL, /* check_liveness: not needed */ - get_driver_methods + get_driver_methods, + NULL }; static char *make_filename_safe(const char *filename TSRMLS_DC) diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 87e96eda91..c20fc6f9e2 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -484,7 +484,7 @@ PHP_FUNCTION(shell_exec) } stream = php_stream_fopen_from_pipe(in, "rb"); - total_readbytes = php_stream_copy_to_mem(stream, &ret, PHP_STREAM_COPY_ALL, 0); + total_readbytes = php_stream_copy_to_mem(stream, (void *)&ret, PHP_STREAM_COPY_ALL, 0); php_stream_close(stream); if (total_readbytes > 0) {