Skip to content

Commit 84a05d4

Browse files
author
Michael Meskes
committed
Changed test case slightly so it doesn't have an unused typedef.
1 parent 2a781d5 commit 84a05d4

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

src/interfaces/ecpg/test/expected/preproc-define.c

+13-9
Original file line numberDiff line numberDiff line change
@@ -125,39 +125,43 @@ if (sqlca.sqlcode < 0) sqlprint();}
125125
for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
126126
{
127127
/* exec sql begin declare section */
128-
128+
129+
129130

130131

131132
#line 48 "define.pgc"
132-
char n [ 8 ] , l = letter [ i ] [ 0 ] ;
133+
string n ;
133134

134135
#line 49 "define.pgc"
136+
char l = letter [ i ] [ 0 ] ;
137+
138+
#line 50 "define.pgc"
135139
int a = amount [ i ] ;
136140
/* exec sql end declare section */
137-
#line 50 "define.pgc"
141+
#line 51 "define.pgc"
138142

139143

140144
strncpy(n, name[i], 8);
141145
printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
142146
}
143147

144148
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
145-
#line 56 "define.pgc"
149+
#line 57 "define.pgc"
146150

147151
if (sqlca.sqlcode < 0) sqlprint();}
148-
#line 56 "define.pgc"
152+
#line 57 "define.pgc"
149153

150154
{ ECPGtrans(__LINE__, NULL, "commit");
151-
#line 57 "define.pgc"
155+
#line 58 "define.pgc"
152156

153157
if (sqlca.sqlcode < 0) sqlprint();}
154-
#line 57 "define.pgc"
158+
#line 58 "define.pgc"
155159

156160
{ ECPGdisconnect(__LINE__, "CURRENT");
157-
#line 58 "define.pgc"
161+
#line 59 "define.pgc"
158162

159163
if (sqlca.sqlcode < 0) sqlprint();}
160-
#line 58 "define.pgc"
164+
#line 59 "define.pgc"
161165

162166

163167
return (0);

src/interfaces/ecpg/test/expected/preproc-define.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
[NO_PID]: sqlca: code: 0, state: 00000
4343
[NO_PID]: ecpg_get_data on line 43: RESULT: t offset: -1; array: no
4444
[NO_PID]: sqlca: code: 0, state: 00000
45-
[NO_PID]: ecpg_execute on line 56: query: drop table test; with 0 parameter(s) on connection regress1
45+
[NO_PID]: ecpg_execute on line 57: query: drop table test; with 0 parameter(s) on connection regress1
4646
[NO_PID]: sqlca: code: 0, state: 00000
47-
[NO_PID]: ecpg_execute on line 56: using PQexec
47+
[NO_PID]: ecpg_execute on line 57: using PQexec
4848
[NO_PID]: sqlca: code: 0, state: 00000
49-
[NO_PID]: ecpg_execute on line 56: OK: DROP TABLE
49+
[NO_PID]: ecpg_execute on line 57: OK: DROP TABLE
5050
[NO_PID]: sqlca: code: 0, state: 00000
51-
[NO_PID]: ECPGtrans on line 57: action "commit"; connection "regress1"
51+
[NO_PID]: ECPGtrans on line 58: action "commit"; connection "regress1"
5252
[NO_PID]: sqlca: code: 0, state: 00000
5353
[NO_PID]: ecpg_finish: connection regress1 closed
5454
[NO_PID]: sqlca: code: 0, state: 00000

src/interfaces/ecpg/test/preproc/define.pgc

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ exec sql end declare section;
4545
for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
4646
{
4747
exec sql begin declare section;
48-
char n[8], l = letter[i][0];
48+
string n;
49+
char l = letter[i][0];
4950
int a = amount[i];
5051
exec sql end declare section;
5152

0 commit comments

Comments
 (0)