Skip to content

Commit f6804c1

Browse files
committed
Fix [-Werror=implicit-fallthrough=] in Firebird PDO driver
1 parent dc3bfca commit f6804c1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ext/pdo_firebird/firebird_driver.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ int preprocess(const zend_string* sql, char* sql_out, HashTable* named_params)
429429
return 1;
430430
}
431431
}
432+
/* TODO Check this is correct? */
433+
ZEND_FALLTHROUGH;
432434

433435
case ttWhite:
434436
case ttComment:
@@ -956,6 +958,8 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v
956958
ZVAL_STRING(val, tmp);
957959
return 1;
958960
}
961+
/* TODO Check this is correct? */
962+
ZEND_FALLTHROUGH;
959963

960964
case PDO_ATTR_FETCH_TABLE_NAMES:
961965
ZVAL_BOOL(val, H->fetch_table_names);

ext/pdo_firebird/firebird_statement.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ static int firebird_stmt_execute(pdo_stmt_t *stmt) /* {{{ */
135135
}
136136
stmt->row_count = affected_rows;
137137
}
138+
/* TODO Dead code or assert one of the previous cases are hit? */
138139
default:
139140
;
140141
}
@@ -684,6 +685,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
684685
var->sqllen = Z_STRLEN_P(parameter);
685686
break;
686687
}
688+
ZEND_FALLTHROUGH;
687689
case IS_NULL:
688690
/* complain if this field doesn't allow NULL values */
689691
if (~var->sqltype & 1) {

0 commit comments

Comments
 (0)