Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Dec 21, 2024
1 parent 6713507 commit a40fe0b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From bcb7dadc34e68c6457d56e1c43df61597dfdfc76 Mon Sep 17 00:00:00 2001
From: Shivam Mathur <[email protected]>
Date: Sat, 21 Dec 2024 08:02:11 +0000
Subject: [PATCH] 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 add a ; after the case label before the declaration.
---
ext/pdo_firebird/firebird_statement.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c
index 910b325112..eacb6f5d59 100644
--- a/ext/pdo_firebird/firebird_statement.c
+++ b/ext/pdo_firebird/firebird_statement.c
@@ -886,7 +886,7 @@ static int pdo_firebird_stmt_set_attribute(pdo_stmt_t *stmt, zend_long attr, zva
switch (attr) {
default:
return 0;
- case PDO_ATTR_CURSOR_NAME:
+ case PDO_ATTR_CURSOR_NAME: ;
zend_string *str_val = zval_try_get_string(val);
if (str_val == NULL) {
return 0;
--
2.47.1

1 change: 1 addition & 0 deletions config/patches/8.5/series
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@
0042-Update-gcc-func-attr-macro.patch
0043-scripts-php-.in-Explicitly-define-the-path-to-sed.patch
0044-Remove-timestamps-from-phar.patch
0045-ext-pdo_firebird-Fix-label-follow-by-declaration.patch

0 comments on commit a40fe0b

Please sign in to comment.