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

Commit51a5921

Browse files
author
Michael Meskes
committed
Fixed a few minor glitches pointed out by splint.
1 parent7b009a2 commit51a5921

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,10 @@ Wed, 10 Oct 2007 08:31:44 +0200
22682268
Tue, 06 Nov 2007 09:29:22 +0100
22692269

22702270
- Fixed two parser bugs.
2271+
2272+
Fri, 21 Dec 2007 15:30:39 +0100
2273+
2274+
- Fixed a few minor glitches pointed out by splint.
22712275
- Set pgtypes library version to 3.0.
22722276
- Set compat library version to 3.0.
22732277
- Set ecpg library version to 6.0.

‎src/interfaces/ecpg/preproc/descriptor.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* functions needed for descriptor handling
33
*
4-
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.25 2007/02/07 00:52:35 petere Exp $
4+
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.26 2007/12/21 14:33:20 meskes Exp $
55
*
66
* since descriptor might be either a string constant or a string var
77
* we need to check for a constant if we expect a constant
@@ -15,7 +15,7 @@
1515
* assignment handling function (descriptor)
1616
*/
1717

18-
structassignment*assignments;
18+
staticstructassignment*assignments;
1919

2020
void
2121
push_assignment(char*var,enumECPGdtypevalue)
@@ -43,7 +43,7 @@ drop_assignments(void)
4343
}
4444

4545
staticvoid
46-
ECPGnumeric_lvalue(FILE*f,char*name)
46+
ECPGnumeric_lvalue(char*name)
4747
{
4848
conststructvariable*v=find_variable(name);
4949

@@ -156,7 +156,7 @@ output_get_descr_header(char *desc_name)
156156
for (results=assignments;results!=NULL;results=results->next)
157157
{
158158
if (results->value==ECPGd_count)
159-
ECPGnumeric_lvalue(yyout,results->variable);
159+
ECPGnumeric_lvalue(results->variable);
160160
else
161161
mmerror(PARSE_ERROR,ET_WARNING,"unknown descriptor header item '%d'",results->value);
162162
}
@@ -205,7 +205,7 @@ output_set_descr_header(char *desc_name)
205205
for (results=assignments;results!=NULL;results=results->next)
206206
{
207207
if (results->value==ECPGd_count)
208-
ECPGnumeric_lvalue(yyout,results->variable);
208+
ECPGnumeric_lvalue(results->variable);
209209
else
210210
mmerror(PARSE_ERROR,ET_WARNING,"unknown descriptor header item '%d'",results->value);
211211
}
@@ -317,7 +317,7 @@ struct variable *
317317
descriptor_variable(constchar*name,intinput)
318318
{
319319
staticchardescriptor_names[2][MAX_DESCRIPTOR_NAMELEN];
320-
staticconststructECPGtypedescriptor_type= {ECPGt_descriptor,NULL};
320+
staticconststructECPGtypedescriptor_type= {ECPGt_descriptor,NULL,NULL, {NULL},0};
321321
staticconststructvariablevarspace[2]= {
322322
{descriptor_names[0], (structECPGtype*)&descriptor_type,0,NULL},
323323
{descriptor_names[1], (structECPGtype*)&descriptor_type,0,NULL}

‎src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.102 2007/11/15 21:14:45 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.103 2007/12/2114:33:20 meskes Exp $ */
22

33
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
44
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -18,7 +18,6 @@ intret_value = 0,
1818
system_includes= false,
1919
force_indicator= true,
2020
questionmarks= false,
21-
header_mode= false,
2221
regression_mode= false,
2322
auto_prepare= false;
2423

@@ -132,6 +131,7 @@ main(int argc, char *const argv[])
132131
intfnr,
133132
c,
134133
verbose= false,
134+
header_mode= false,
135135
out_option=0;
136136
struct_include_path*ip;
137137
constchar*progname;
@@ -200,7 +200,7 @@ main(int argc, char *const argv[])
200200
case'h':
201201
header_mode= true;
202202
/* this must include "-c" to make sense */
203-
/* so do not place a break; here */
203+
/* so do not place a"break;" here */
204204
case'c':
205205
auto_create_c= true;
206206
break;

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.355 2007/11/06 08:32:08 meskes Exp $*/
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.356 2007/12/21 14:33:20 meskes Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -47,10 +47,10 @@ static char *ECPGstruct_sizeof = NULL;
4747
/* for forward declarations we have to store some data as well*/
4848
staticchar *forward_name =NULL;
4949

50-
structECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR,0L,NULL, {NULL}};
50+
structECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR,NULL,NULL, {NULL},0};
5151
structvariable no_indicator = {"no_indicator", &ecpg_no_indicator,0,NULL};
5252

53-
structECPGtype ecpg_query = {ECPGt_char_variable,0L,NULL, {NULL}};
53+
structECPGtype ecpg_query = {ECPGt_char_variable,NULL,NULL, {NULL},0};
5454

5555
/*
5656
* Handle parsing errors and warnings

‎src/interfaces/ecpg/preproc/type.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.76 2007/11/15 21:14:45 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/type.c,v 1.77 2007/12/2114:33:20 meskes Exp $ */
22

33
#include"postgres_fe.h"
44

55
#include"extern.h"
66

77
#defineindicator_set ind_type != NULL && ind_type->type != ECPGt_NO_INDICATOR
88

9-
structECPGstruct_memberstruct_no_indicator= {"no_indicator",&ecpg_no_indicator,NULL};
9+
staticstructECPGstruct_memberstruct_no_indicator= {"no_indicator",&ecpg_no_indicator,NULL};
1010

1111
/* malloc + error check */
1212
void*

‎src/interfaces/ecpg/preproc/variable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.42 2007/08/14 10:01:53 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.43 2007/12/21 14:33:20 meskes Exp $ */
22

33
#include"postgres_fe.h"
44

55
#include"extern.h"
66

7-
structvariable*allvariables=NULL;
7+
staticstructvariable*allvariables=NULL;
88

99
structvariable*
1010
new_variable(constchar*name,structECPGtype*type,intbrace_level)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp