]> granicus.if.org Git - php/commitdiff
- Fixed compilation warnings
authorFelipe Pena <felipe@php.net>
Sat, 22 Mar 2008 20:37:08 +0000 (20:37 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 22 Mar 2008 20:37:08 +0000 (20:37 +0000)
ext/pdo/pdo_sql_parser.re
ext/pdo_sqlite/sqlite_statement.c
ext/sqlite/pdo_sqlite2.c
ext/standard/exec.c

index 08fa14c81ec226f0b18cc57729dd43d70a403ed3..815c3d400c3cb659a98c4c3f79e4bd15d7968a41 100644 (file)
@@ -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 */
index 7bd175c98ba69ad68bc05489cb6b611b47b7c763..0efbd687317439f0aa34192e340ef8a7e51473fb 100644 (file)
@@ -127,7 +127,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
                                                                SEPARATE_ZVAL(&param->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;
index 16932e381fa67005d2e1d1e6a59c4ba3a168f129..784b4ff732a99e6eb3d40ba73f5af365245380c9 100644 (file)
@@ -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)
index 87e96eda91229e14881a861fee68468c1eda9290..c20fc6f9e2eb6ace14ac75df7fef38a76340aca1 100644 (file)
@@ -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) {