Skip to content

Commit a21ff4b

Browse files
committed
ext/pdo_firebird: Fix label follow by declaration
A label should be followed by a statement and not a declaration, else old gcc gives the following error: a label can only be part of a statement and a declaration is not a statement To fix this we wrap the code in the switch case block in braces.
1 parent afc1f0d commit a21ff4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/pdo_firebird/firebird_statement.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static int pdo_firebird_stmt_set_attribute(pdo_stmt_t *stmt, zend_long attr, zva
886886
switch (attr) {
887887
default:
888888
return 0;
889-
case PDO_ATTR_CURSOR_NAME:
889+
case PDO_ATTR_CURSOR_NAME: {
890890
zend_string *str_val = zval_try_get_string(val);
891891
if (str_val == NULL) {
892892
return 0;
@@ -907,6 +907,7 @@ static int pdo_firebird_stmt_set_attribute(pdo_stmt_t *stmt, zend_long attr, zva
907907
memcpy(S->name, ZSTR_VAL(str_val), ZSTR_LEN(str_val) + 1);
908908
zend_string_release(str_val);
909909
break;
910+
}
910911
}
911912
return 1;
912913
}

0 commit comments

Comments
 (0)