Skip to content

Commit 5f8f8cb

Browse files
author
Michael Meskes
committed
Changed test case slightly so it doesn't have an unused typedef.
1 parent d74eaf3 commit 5f8f8cb

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

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

Lines changed: 13 additions & 9 deletions
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

Lines changed: 4 additions & 4 deletions
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: yes
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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy