Skip to content

Commit c552003

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in ODBC extension
1 parent 18c87ce commit c552003

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ext/odbc/php_odbc.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ int odbc_bindcols(odbc_result *result)
662662
#else
663663
charextraalloc = 1;
664664
#endif
665+
/* TODO: Check this is the intended behaviour */
666+
fallthrough;
665667
default:
666668
rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), colfieldid,
667669
NULL, 0, NULL, &displaysize);
@@ -1418,6 +1420,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
14181420
if (result->binmode == 1) {
14191421
sql_c_type = SQL_C_BINARY;
14201422
}
1423+
fallthrough;
14211424
case SQL_LONGVARCHAR:
14221425
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
14231426
case SQL_WLONGVARCHAR:
@@ -1569,6 +1572,8 @@ PHP_FUNCTION(odbc_fetch_into)
15691572
}
15701573
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
15711574

1575+
/* TODO: Check this is the intended behaviour */
1576+
fallthrough;
15721577
case SQL_LONGVARCHAR:
15731578
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
15741579
case SQL_WLONGVARCHAR:
@@ -1790,6 +1795,9 @@ PHP_FUNCTION(odbc_result)
17901795
if (result->binmode <= 0) {
17911796
break;
17921797
}
1798+
/* TODO: Check this is the intended behaviour */
1799+
fallthrough;
1800+
17931801
case SQL_LONGVARCHAR:
17941802
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
17951803
case SQL_WLONGVARCHAR:
@@ -1955,6 +1963,9 @@ PHP_FUNCTION(odbc_result_all)
19551963
break;
19561964
}
19571965
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
1966+
1967+
/* TODO: Check this is the intended behaviour */
1968+
fallthrough;
19581969
case SQL_LONGVARCHAR:
19591970
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
19601971
case SQL_WLONGVARCHAR:

0 commit comments

Comments
 (0)