Skip to content

Commit 25b345a

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in ODBC extension
1 parent f68ae8d commit 25b345a

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);
@@ -1595,6 +1597,8 @@ PHP_FUNCTION(odbc_fetch_into)
15951597
}
15961598
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
15971599

1600+
/* TODO: Check this is the intended behaviour */
1601+
fallthrough;
15981602
case SQL_LONGVARCHAR:
15991603
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
16001604
case SQL_WLONGVARCHAR:
@@ -1816,6 +1820,9 @@ PHP_FUNCTION(odbc_result)
18161820
if (result->binmode <= 0) {
18171821
break;
18181822
}
1823+
/* TODO: Check this is the intended behaviour */
1824+
fallthrough;
1825+
18191826
case SQL_LONGVARCHAR:
18201827
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
18211828
case SQL_WLONGVARCHAR:
@@ -1981,6 +1988,9 @@ PHP_FUNCTION(odbc_result_all)
19811988
break;
19821989
}
19831990
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
1991+
1992+
/* TODO: Check this is the intended behaviour */
1993+
fallthrough;
19841994
case SQL_LONGVARCHAR:
19851995
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
19861996
case SQL_WLONGVARCHAR:

0 commit comments

Comments
 (0)