Skip to content

Commit 2024e23

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

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ext/odbc/php_odbc.c

Lines changed: 10 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);
@@ -1569,6 +1571,8 @@ PHP_FUNCTION(odbc_fetch_into)
15691571
}
15701572
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
15711573

1574+
/* TODO: Check this is the intended behaviour */
1575+
fallthrough;
15721576
case SQL_LONGVARCHAR:
15731577
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
15741578
case SQL_WLONGVARCHAR:
@@ -1790,6 +1794,9 @@ PHP_FUNCTION(odbc_result)
17901794
if (result->binmode <= 0) {
17911795
break;
17921796
}
1797+
/* TODO: Check this is the intended behaviour */
1798+
fallthrough;
1799+
17931800
case SQL_LONGVARCHAR:
17941801
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
17951802
case SQL_WLONGVARCHAR:
@@ -1955,6 +1962,9 @@ PHP_FUNCTION(odbc_result_all)
19551962
break;
19561963
}
19571964
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
1965+
1966+
/* TODO: Check this is the intended behaviour */
1967+
fallthrough;
19581968
case SQL_LONGVARCHAR:
19591969
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
19601970
case SQL_WLONGVARCHAR:

0 commit comments

Comments
 (0)