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

Commit278bbf4

Browse files
committed
Make functions static or NOT_USED as appropriate.
1 parent1801862 commit278bbf4

File tree

34 files changed

+123
-153
lines changed

34 files changed

+123
-153
lines changed

‎src/backend/access/common/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for access/common
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.12 1998/07/2604:30:16 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.13 1999/05/2612:55:05 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -17,7 +17,7 @@ ifdef MULTIBYTE
1717
CFLAGS+=$(MBFLAGS)
1818
endif
1919

20-
OBJS = heaptuple.oheapvalid.oindextuple.o indexvalid.o printtup.o\
20+
OBJS = heaptuple.o indextuple.o indexvalid.o printtup.o\
2121
scankey.o tupdesc.o
2222

2323
all: SUBSYS.o

‎src/backend/access/common/heapvalid.c

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎src/backend/commands/copy.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.77 1999/05/25 16:08:19 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.78 1999/05/26 12:55:10 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -73,14 +73,14 @@ static intlineno;
7373
/*
7474
* Internal communications functions
7575
*/
76-
inlinevoidCopySendData(void*databuf,intdatasize,FILE*fp);
77-
inlinevoidCopySendString(char*str,FILE*fp);
78-
inlinevoidCopySendChar(charc,FILE*fp);
79-
inlinevoidCopyGetData(void*databuf,intdatasize,FILE*fp);
80-
inlineintCopyGetChar(FILE*fp);
81-
inlineintCopyGetEof(FILE*fp);
82-
inlineintCopyPeekChar(FILE*fp);
83-
inlinevoidCopyDonePeek(FILE*fp,intc,intpickup);
76+
staticvoidCopySendData(void*databuf,intdatasize,FILE*fp);
77+
staticvoidCopySendString(char*str,FILE*fp);
78+
staticvoidCopySendChar(charc,FILE*fp);
79+
staticvoidCopyGetData(void*databuf,intdatasize,FILE*fp);
80+
staticintCopyGetChar(FILE*fp);
81+
staticintCopyGetEof(FILE*fp);
82+
staticintCopyPeekChar(FILE*fp);
83+
staticvoidCopyDonePeek(FILE*fp,intc,intpickup);
8484

8585
/*
8686
* CopySendData sends output data either to the file
@@ -92,7 +92,7 @@ inline void CopyDonePeek(FILE *fp, int c, int pickup);
9292
*
9393
* NB: no data conversion is applied by these functions
9494
*/
95-
inlinevoid
95+
staticvoid
9696
CopySendData(void*databuf,intdatasize,FILE*fp)
9797
{
9898
if (!fp)
@@ -101,13 +101,13 @@ CopySendData(void *databuf, int datasize, FILE *fp)
101101
fwrite(databuf,datasize,1,fp);
102102
}
103103

104-
inlinevoid
104+
staticvoid
105105
CopySendString(char*str,FILE*fp)
106106
{
107107
CopySendData(str,strlen(str),fp);
108108
}
109109

110-
inlinevoid
110+
staticvoid
111111
CopySendChar(charc,FILE*fp)
112112
{
113113
CopySendData(&c,1,fp);
@@ -123,7 +123,7 @@ CopySendChar(char c, FILE *fp)
123123
*
124124
* NB: no data conversion is applied by these functions
125125
*/
126-
inlinevoid
126+
staticvoid
127127
CopyGetData(void*databuf,intdatasize,FILE*fp)
128128
{
129129
if (!fp)
@@ -132,7 +132,7 @@ CopyGetData(void *databuf, int datasize, FILE *fp)
132132
fread(databuf,datasize,1,fp);
133133
}
134134

135-
inlineint
135+
staticint
136136
CopyGetChar(FILE*fp)
137137
{
138138
if (!fp)
@@ -147,7 +147,7 @@ CopyGetChar(FILE *fp)
147147
returngetc(fp);
148148
}
149149

150-
inlineint
150+
staticint
151151
CopyGetEof(FILE*fp)
152152
{
153153
if (!fp)
@@ -164,7 +164,7 @@ CopyGetEof(FILE *fp)
164164
* CopyDonePeek will either take the peeked char off the steam
165165
* (if pickup is != 0) or leave it on the stream (if pickup == 0)
166166
*/
167-
inlineint
167+
staticint
168168
CopyPeekChar(FILE*fp)
169169
{
170170
if (!fp)
@@ -173,7 +173,7 @@ CopyPeekChar(FILE *fp)
173173
returngetc(fp);
174174
}
175175

176-
inlinevoid
176+
staticvoid
177177
CopyDonePeek(FILE*fp,intc,intpickup)
178178
{
179179
if (!fp)

‎src/backend/lib/stringinfo.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: stringinfo.c,v 1.16 1999/05/25 16:08:53 momjian Exp $
11+
* $Id: stringinfo.c,v 1.17 1999/05/26 12:55:14 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -19,6 +19,7 @@
1919
#include"postgres.h"
2020
#include"lib/stringinfo.h"
2121

22+
#ifdefNOT_USED
2223
/*
2324
* makeStringInfo
2425
*
@@ -37,6 +38,7 @@ makeStringInfo(void)
3738

3839
returnres;
3940
}
41+
#endif
4042

4143
/*
4244
* initStringInfo

‎src/backend/libpq/auth.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.36 1999/05/25 16:08:55 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.37 1999/05/26 12:55:15 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -50,6 +50,7 @@ static intpg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt);
5050
staticintcheckPassword(Port*port,char*user,char*password);
5151
staticintold_be_recvauth(Port*port);
5252
staticintmap_old_to_new(Port*port,UserAuthold,intstatus);
53+
staticvoidauth_failed(Port*port);
5354

5455

5556
#ifdefKRB4
@@ -402,7 +403,7 @@ pg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt)
402403
* postmaster log, which we hope is only readable by good guys.
403404
*/
404405

405-
void
406+
staticvoid
406407
auth_failed(Port*port)
407408
{
408409
charbuffer[512];

‎src/backend/nodes/freefuncs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.18 1999/05/25 22:41:13 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.19 1999/05/26 12:55:20 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -35,6 +35,7 @@
3535
* plannodes.h free functions
3636
* ****************************************************************
3737
*/
38+
staticvoidfreeObject(void*obj);
3839

3940
/* ----------------
4041
*FreePlanFields
@@ -1157,7 +1158,7 @@ _freeValue(Value *node)
11571158
*recursively frees its items.
11581159
* ----------------
11591160
*/
1160-
void
1161+
staticvoid
11611162
freeObject(void*node)
11621163
{
11631164
if (node==NULL)

‎src/backend/optimizer/path/joinrels.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.34 1999/05/25 22:41:31 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.35 1999/05/26 12:55:27 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -28,6 +28,9 @@ static bool nonoverlap_sets(List *s1, List *s2);
2828
staticboolis_subset(List*s1,List*s2);
2929
staticvoidset_joinrel_size(RelOptInfo*joinrel,RelOptInfo*outer_rel,
3030
RelOptInfo*inner_rel,JoinInfo*jinfo);
31+
staticRelOptInfo*make_join_rel(RelOptInfo*outer_rel,RelOptInfo*inner_rel,
32+
JoinInfo*joininfo);
33+
staticList*new_join_tlist(List*tlist,intfirst_resdomno);
3134

3235
/*
3336
* make_rels_by_joins
@@ -191,7 +194,7 @@ make_rels_by_clauseless_joins(RelOptInfo *old_rel, List *inner_rels)
191194
*
192195
* Returns the new join relation node.
193196
*/
194-
RelOptInfo*
197+
staticRelOptInfo*
195198
make_join_rel(RelOptInfo*outer_rel,RelOptInfo*inner_rel,JoinInfo*joininfo)
196199
{
197200
RelOptInfo*joinrel=makeNode(RelOptInfo);
@@ -265,7 +268,7 @@ make_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
265268
*
266269
* Returns the new target list.
267270
*/
268-
List*
271+
staticList*
269272
new_join_tlist(List*tlist,
270273
intfirst_resdomno)
271274
{

‎src/backend/optimizer/plan/setrefs.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.48 1999/05/25 22:41:41 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.49 1999/05/26 12:55:28 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -47,6 +47,9 @@ static bool OperandIsInner(Node *opnd, int inner_relid);
4747
staticList*pull_agg_clause(Node*clause);
4848
staticNode*del_agg_clause(Node*clause);
4949
staticvoidset_result_tlist_references(Result*resultNode);
50+
staticvoidreplace_vars_with_subplan_refs(Node*clause,
51+
Indexsubvarno,
52+
List*subplanTargetList);
5053

5154
/*****************************************************************************
5255
*
@@ -603,7 +606,7 @@ replace_tlist_with_subplan_refs(List *tlist,
603606
* Afterwards, all Var nodes have varno = subvarno, varattno = resno
604607
* of corresponding subplan target.
605608
*/
606-
void
609+
staticvoid
607610
replace_vars_with_subplan_refs(Node*clause,
608611
Indexsubvarno,
609612
List*subplanTargetList)

‎src/backend/parser/parse_clause.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.36 1999/05/25 16:10:14 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.37 1999/05/26 12:55:35 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -41,14 +41,12 @@ static TargetEntry *
4141

4242
staticvoidparseFromClause(ParseState*pstate,List*frmList,Node**qual);
4343

44-
Attr*makeAttr(char*relname,char*attname);
45-
4644
#ifdefENABLE_OUTER_JOINS
4745
Node*transformUsingClause(ParseState*pstate,List*onList,char*lname,char*rname);
4846

4947
#endif
5048

51-
char*transformTableEntry(ParseState*pstate,RangeVar*r);
49+
staticchar*transformTableEntry(ParseState*pstate,RangeVar*r);
5250

5351

5452
/*
@@ -126,7 +124,8 @@ transformWhereClause(ParseState *pstate, Node *a_expr, Node *o_expr)
126124
returnqual;
127125
}
128126

129-
Attr*
127+
#ifdefNOT_USED
128+
staticAttr*
130129
makeAttr(char*relname,char*attname)
131130
{
132131
Attr*a=makeNode(Attr);
@@ -138,6 +137,7 @@ makeAttr(char *relname, char *attname)
138137

139138
returna;
140139
}
140+
#endif
141141

142142
#ifdefENABLE_OUTER_JOINS
143143
/* transformUsingClause()
@@ -206,7 +206,7 @@ transformUsingClause(ParseState *pstate, List *onList, char *lname, char *rname)
206206

207207
#endif
208208

209-
char*
209+
staticchar*
210210
transformTableEntry(ParseState*pstate,RangeVar*r)
211211
{
212212
RelExpr*baserel=r->relExpr;
@@ -744,7 +744,8 @@ transformSortClause(ParseState *pstate,
744744
* Let's just try matching in pairs for now (right to left) and see if it works.
745745
* - thomas 1998-05-22
746746
*/
747-
List*
747+
#ifdefNOT_USED
748+
staticList*
748749
transformUnionClause(List*unionClause,List*targetlist)
749750
{
750751
List*union_list=NIL;
@@ -832,4 +833,5 @@ transformUnionClause(List *unionClause, List *targetlist)
832833
}
833834
else
834835
returnNIL;
835-
}/* transformUnionClause() */
836+
}
837+
#endif

‎src/backend/parser/parse_expr.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.48 1999/05/25 16:10:16 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.49 1999/05/26 12:55:37 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -33,6 +33,7 @@
3333
#include"utils/builtins.h"
3434

3535
staticNode*parser_typecast(Value*expr,TypeName*typename,int32atttypmod);
36+
staticNode*transformIdent(ParseState*pstate,Node*expr,intprecedence);
3637

3738
/*
3839
* transformExpr -
@@ -534,7 +535,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
534535
returnresult;
535536
}
536537

537-
Node*
538+
staticNode*
538539
transformIdent(ParseState*pstate,Node*expr,intprecedence)
539540
{
540541
Ident*ident= (Ident*)expr;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp