]> granicus.if.org Git - php/commitdiff
Various compiler warning fixes.
authorIlia Alshanetsky <iliaa@php.net>
Wed, 18 May 2005 22:40:56 +0000 (22:40 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 18 May 2005 22:40:56 +0000 (22:40 +0000)
ext/pdo/php_pdo_driver.h
ext/pdo_mysql/mysql_driver.c
ext/pdo_mysql/mysql_statement.c
ext/pdo_pgsql/pgsql_driver.c
ext/pdo_pgsql/pgsql_statement.c

index 3328c911c17b46457ded02d81650fbce871b0260..2036a1381dd284863017a535b8dfefc3dd51bb39 100755 (executable)
@@ -105,7 +105,7 @@ enum pdo_fetch_orientation {
        PDO_FETCH_ORI_FIRST,    /* scroll to the first row and fetch that */
        PDO_FETCH_ORI_LAST,             /* scroll to the last row and fetch that */
        PDO_FETCH_ORI_ABS,              /* scroll to an absolute numbered row and fetch that */
-       PDO_FETCH_ORI_REL,              /* scroll relative to the current row, and fetch that */
+       PDO_FETCH_ORI_REL               /* scroll relative to the current row, and fetch that */
 };
 
 enum pdo_attribute_type {
@@ -132,7 +132,7 @@ enum pdo_attribute_type {
 
 enum pdo_cursor_type {
        PDO_CURSOR_FWDONLY,             /* forward only cursor (default) */
-       PDO_CURSOR_SCROLL,              /* scrollable cursor */
+       PDO_CURSOR_SCROLL               /* scrollable cursor */
 };
 
 /* SQL-92 SQLSTATE error codes.
@@ -170,7 +170,7 @@ typedef char pdo_error_type[6]; /* SQLSTATE */
 #define        PDO_ERR_DISCONNECTED,
 #define        PDO_ERR_NO_PERM,
 
-       PDO_ERR_CANT_MAP,               /* no way to map native error to the generic
+       PDO_ERR_CANT_MAP                /* no way to map native error to the generic
                                                         * codes; consult the native error for more info */
 };
 #endif
@@ -178,7 +178,7 @@ typedef char pdo_error_type[6]; /* SQLSTATE */
 enum pdo_error_mode {
        PDO_ERRMODE_SILENT,             /* just set error codes */
        PDO_ERRMODE_WARNING,    /* raise E_WARNING */
-       PDO_ERRMODE_EXCEPTION,  /* throw exceptions */
+       PDO_ERRMODE_EXCEPTION   /* throw exceptions */
 };
 
 enum pdo_case_conversion {
@@ -327,7 +327,7 @@ enum pdo_param_event {
        PDO_PARAM_EVT_EXEC_PRE,
        PDO_PARAM_EVT_EXEC_POST,
        PDO_PARAM_EVT_FETCH_PRE,
-       PDO_PARAM_EVT_FETCH_POST,
+       PDO_PARAM_EVT_FETCH_POST
 };
 
 typedef int (*pdo_stmt_param_hook_func)(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo_param_event event_type TSRMLS_DC);
index 188f250ce886b06650a1da1fa40fcc235f853774..b7647269b9dbb14f0932672605293f78ec5fa90f 100755 (executable)
@@ -46,7 +46,6 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin
        pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
        pdo_error_type *pdo_err; 
        pdo_mysql_error_info *einfo;
-       char *sqlstate = NULL;
 
        if (stmt) {
                pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
index fa9e2586dc87693c63d8f4cb7df6050814b16ed7..0615534f3502861f203c874282bd62f0b552e1dc 100755 (executable)
@@ -115,7 +115,6 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
 static int pdo_mysql_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
 {
        pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
-       MYSQL_RES *R = S->result;
        struct pdo_column_data *cols = stmt->columns;
        unsigned int i;
 
index b63b20f125b261bc6fa5a1e7419d7e8e50ee91fa..f0531db7ff135f2dcec2c4c488d6b98cf918a59b 100644 (file)
@@ -215,7 +215,7 @@ static char *pdo_pgsql_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned
 
        /* TODO: if name != NULL, pull out last value for that sequence/column */
 
-       *len = spprintf(&id, 0, "%ld", H->pgoid);
+       *len = spprintf(&id, 0, "%lld", H->pgoid);
        return id;
 }
 
index 1abb76d2f0b7633274afd29d64405012e5e67375..821a0537788645cfcdb1f33c979765f631313e65 100644 (file)
@@ -327,7 +327,6 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned
 {
        pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data;
        struct pdo_column_data *cols = stmt->columns;
-       char *tmp_ptr;
        size_t tmp_len;
 
        if (!S->result) {