8000 ecpg: Avoid C99-ism in newly-added test for Oracle compat · postgres/postgres@dbd25dd · GitHub
[go: up one dir, main page]

Skip to content

Commit dbd25dd

Browse files
committed
ecpg: Avoid C99-ism in newly-added test for Oracle compat
Per buildfarm member mylodon. As C99 declarations are allowed in v12~, this is adjusted only on REL_11_STABLE. Introduced by 9eb44bb.
1 parent 9eb44bb commit dbd25dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/interfaces/ecpg/test/compat_oracle/char_array.pgc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
EXEC SQL WHENEVER SQLERROR SQLPRINT;
2424

2525
const char *ppppp = "XXXXX";
26-
int loopcount;
26+
int loopcount, i;
2727
sqlda_t *sqlda = NULL;
2828

2929
EXEC SQL BEGIN DECLARE SECTION;
@@ -70,7 +70,7 @@ int main() {
7070
EXEC SQL FETCH NEXT FROM cur1 INTO DESCRIPTOR sqlda;
7171

7272
printf("\n-----------------\ntype : data\n");
73-
for (int i = 0 ; i < sqlda->sqld ; i++)
73+
for (i = 0 ; i < sqlda->sqld ; i++)
7474
{
7575
sqlvar_t v = sqlda->sqlvar[i];
7676
char *sqldata = v.sqldata;

src/interfaces/ecpg/test/expected/compat_oracle-char_array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main() {
6767

6868

6969
const char *ppppp = "XXXXX";
70-
int loopcount;
70+
int loopcount, i;
7171
sqlda_t *sqlda = NULL;
7272

7373
/* exec sql begin declare section */
@@ -280,7 +280,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
280280

281281

282282
printf("\n-----------------\ntype : data\n");
283-
for (int i = 0 ; i < sqlda->sqld ; i++)
283+
for (i = 0 ; i < sqlda->sqld ; i++)
284284
{
285285
sqlvar_t v = sqlda->sqlvar[i];
286286
char *sqldata = v.sqldata;

0 commit comments

Comments
 (0)
0