Skip to content

Commit 3340b79

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in ODBC extension
1 parent 77297f1 commit 3340b79

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);
@@ -1419,6 +1421,7 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
14191421
if (result->binmode == 1) {
14201422
sql_c_type = SQL_C_BINARY;
14211423
}
1424+
fallthrough;
14221425
case SQL_LONGVARCHAR:
14231426
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
14241427
case SQL_WLONGVARCHAR:
@@ -1573,6 +1576,8 @@ PHP_FUNCTION(odbc_fetch_into)
15731576
}
15741577
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
15751578

1579+
/* TODO: Check this is the intended behaviour */
1580+
fallthrough;
15761581
case SQL_LONGVARCHAR:
15771582
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
15781583
case SQL_WLONGVARCHAR:
@@ -1797,6 +1802,9 @@ PHP_FUNCTION(odbc_result)
17971802
if (result->binmode <= 0) {
17981803
break;
17991804
}
1805+
/* TODO: Check this is the intended behaviour */
1806+
fallthrough;
1807+
18001808
case SQL_LONGVARCHAR:
18011809
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
18021810
case SQL_WLONGVARCHAR:
@@ -1969,6 +1977,9 @@ PHP_FUNCTION(odbc_result_all)
19691977
break;
19701978
}
19711979
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
1980+
1981+
/* TODO: Check this is the intended behaviour */
1982+
fallthrough;
19721983
case SQL_LONGVARCHAR:
19731984
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
19741985
case SQL_WLONGVARCHAR:

0 commit comments

Comments
 (0)