Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84a05d4

Browse files
author
Michael Meskes
committed
Changed test case slightly so it doesn't have an unused typedef.
1 parent2a781d5 commit84a05d4

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-
charn [8 ] ,l=letter [i ] [0 ] ;
133+
stringn ;
133134

134135
#line 49 "define.pgc"
136+
charl=letter [i ] [0 ] ;
137+
138+
#line 50 "define.pgc"
135139
inta=amount [i ] ;
136140
/* exec sql end declare section */
137-
#line50 "define.pgc"
141+
#line51 "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-
#line56 "define.pgc"
149+
#line57 "define.pgc"
146150

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

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

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

156160
{ECPGdisconnect(__LINE__,"CURRENT");
157-
#line58 "define.pgc"
161+
#line59 "define.pgc"
158162

159163
if (sqlca.sqlcode<0)sqlprint();}
160-
#line58 "define.pgc"
164+
#line59 "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: no
4444
[NO_PID]: sqlca: code: 0, state: 00000
45-
[NO_PID]: ecpg_execute on line56: query: drop table test; with 0 parameter(s) on connection regress1
45+
[NO_PID]: ecpg_execute on line57: 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 line56: using PQexec
47+
[NO_PID]: ecpg_execute on line57: using PQexec
4848
[NO_PID]: sqlca: code: 0, state: 00000
49-
[NO_PID]: ecpg_execute on line56: OK: DROP TABLE
49+
[NO_PID]: ecpg_execute on line57: OK: DROP TABLE
5050
[NO_PID]: sqlca: code: 0, state: 00000
51-
[NO_PID]: ECPGtrans on line57: action "commit"; connection "regress1"
51+
[NO_PID]: ECPGtrans on line58: 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)

[8]ページ先頭

©2009-2025 Movatter.jp