com php-src: Remove some compilation warnings: 'unused variable' and 'enumeration value not handled in switch': ext/pdo_oci/oci _driver.c
ext/pdo_oci/oci_statement.c ext/pdo_o dbc/odbc_driver.c ext/pdo_odbc/odbc_stmt.c
| From: | Christopher Jones | Date: | Tue, 20 Aug 2013 17:33:00 +0000 |
| Subject: | com php-src: Remove some compilation warnings: 'unused variable' and 'enumeration value not handled in switch': ext/pdo_oci/oci _driver.c ext/pdo_oci/oci_statement.c ext/pdo_o dbc/odbc_driver.c ext/pdo_odbc/odbc_stmt.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73034@lists.php.net to get a copy of this message | ||
Commit: b455ba971c3758a9314e3bf7d56b03264d889b60
Author: Christopher Jones <sixd@php.net> Tue, 20 Aug 2013 10:33:00 -0700
Parents: 72d1ec883e73cfa5efc8e20314de2677440e00e7
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b455ba971c3758a9314e3bf7d56b03264d889b60
Log:
Remove some compilation warnings:
'unused variable' and
'enumeration value not handled in switch'
Changed paths:
M ext/pdo_oci/oci_driver.c
M ext/pdo_oci/oci_statement.c
M ext/pdo_odbc/odbc_driver.c
M ext/pdo_odbc/odbc_stmt.c
Diff:
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index 5497beb..fcdefa9 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -537,7 +537,9 @@ static int pdo_oci_check_liveness(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */
{
pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;
sb4 error_code = 0;
+#if (!((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION
>= 2))))
char version[256];
+#endif
/* TODO move attached check to PDO level */
if (H->attached == 0) {
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c
index dcb9557..6a74efa 100644
--- a/ext/pdo_oci/oci_statement..c
+++ b/ext/pdo_oci/oci_statement.c
@@ -270,6 +270,12 @@ static int oci_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data
*pa
P = (pdo_oci_bound_param*)param->driver_data;
switch (event_type) {
+ case PDO_PARAM_EVT_FETCH_PRE:
+ case PDO_PARAM_EVT_FETCH_POST:
+ case PDO_PARAM_EVT_NORMALIZE:
+ /* Do nothing */
+ break;
+
case PDO_PARAM_EVT_FREE:
P = param->driver_data;
if (P) {
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 3316368..f7f3ef3 100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -263,7 +263,7 @@ out:
static int odbc_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted,
int *quotedlen, enum pdo_param_type param_type TSRMLS_DC)
{
- pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data;
+ /* pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; */
/* TODO: figure it out */
return 0;
}
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 6ee2fcd..0e3fd3c 100644
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -286,6 +286,12 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data
*p
if (param->is_param) {
switch (event_type) {
+ case PDO_PARAM_EVT_FETCH_PRE:
+ case PDO_PARAM_EVT_FETCH_POST:
+ case PDO_PARAM_EVT_NORMALIZE:
+ /* Do nothing */
+ break;
+
case PDO_PARAM_EVT_FREE:
P = param->driver_data;
if (P) {
@@ -543,7 +549,6 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
{
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
struct pdo_column_data *col = &stmt->columns[colno];
- zend_bool dyn = FALSE;
RETCODE rc;
SWORD colnamelen;
SDWORD colsize, displaysize;
@@ -614,7 +619,6 @@ static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned l
/* if it is a column containing "long" data, perform late binding now */
if (C->is_long) {
- unsigned long alloced = 4096;
unsigned long used = 0;
char *buf;
RETCODE rc;