Skip to content

Commit e86e67f

Browse files
committed
Fix [-Wimplicit-fallthrough] warnings in ODBC extension
1 parent 84ad699 commit e86e67f

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:
@@ -1572,6 +1575,8 @@ PHP_FUNCTION(odbc_fetch_into)
15721575
}
15731576
if (result->binmode == 1) sql_c_type = SQL_C_BINARY;
15741577

1578+
/* TODO: Check this is the intended behaviour */
1579+
fallthrough;
15751580
case SQL_LONGVARCHAR:
15761581
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
15771582
case SQL_WLONGVARCHAR:
@@ -1796,6 +1801,9 @@ PHP_FUNCTION(odbc_result)
17961801
if (result->binmode <= 0) {
17971802
break;
17981803
}
1804+
/* TODO: Check this is the intended behaviour */
1805+
fallthrough;
1806+
17991807
case SQL_LONGVARCHAR:
18001808
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
18011809
case SQL_WLONGVARCHAR:
@@ -1968,6 +1976,9 @@ PHP_FUNCTION(odbc_result_all)
19681976
break;
19691977
}
19701978
if (result->binmode <= 1) sql_c_type = SQL_C_BINARY;
1979+
1980+
/* TODO: Check this is the intended behaviour */
1981+
fallthrough;
19711982
case SQL_LONGVARCHAR:
19721983
#if defined(ODBCVER) && (ODBCVER >= 0x0300)
19731984
case SQL_WLONGVARCHAR:

0 commit comments

Comments
 (0)