Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 278bbf4

Browse files
committed
Make functions static or NOT_USED as appropriate.
1 parent 1801862 commit 278bbf4

File tree

34 files changed

+123
-153
lines changed

34 files changed

+123
-153
lines changed

src/backend/access/common/Makefile

+2-2
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/26 04:30:16 scrappy Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.13 1999/05/26 12:55:05 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

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

20-
OBJS = heaptuple.o heapvalid.o indextuple.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

-34
This file was deleted.

src/backend/commands/copy.c

+17-17
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 int lineno;
7373
/*
7474
* Internal communications functions
7575
*/
76-
inline void CopySendData(void *databuf, int datasize, FILE *fp);
77-
inline void CopySendString(char *str, FILE *fp);
78-
inline void CopySendChar(char c, FILE *fp);
79-
inline void CopyGetData(void *databuf, int datasize, FILE *fp);
80-
inline int CopyGetChar(FILE *fp);
81-
inline int CopyGetEof(FILE *fp);
82-
inline int CopyPeekChar(FILE *fp);
83-
inline void CopyDonePeek(FILE *fp, int c, int pickup);
76+
static void CopySendData(void *databuf, int datasize, FILE *fp);
77+
static void CopySendString(char *str, FILE *fp);
78+
static void CopySendChar(char c, FILE *fp);
79+
static void CopyGetData(void *databuf, int datasize, FILE *fp);
80+
static int CopyGetChar(FILE *fp);
81+
static int CopyGetEof(FILE *fp);
82+
static int CopyPeekChar(FILE *fp);
83+
static void CopyDonePeek(FILE *fp, int c, int pickup);
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-
inline void
95+
static void
9696
CopySendData(void *databuf, int datasize, 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-
inline void
104+
static void
105105
CopySendString(char *str, FILE *fp)
106106
{
107107
CopySendData(str, strlen(str), fp);
108108
}
109109

110-
inline void
110+
static void
111111
CopySendChar(char c, 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-
inline void
126+
static void
127127
CopyGetData(void *databuf, int datasize, 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-
inline int
135+
static int
136136
CopyGetChar(FILE *fp)
137137
{
138138
if (!fp)
@@ -147,7 +147,7 @@ CopyGetChar(FILE *fp)
147147
return getc(fp);
148148
}
149149

150-
inline int
150+
static int
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-
inline int
167+
static int
168168
CopyPeekChar(FILE *fp)
169169
{
170170
if (!fp)
@@ -173,7 +173,7 @@ CopyPeekChar(FILE *fp)
173173
return getc(fp);
174174
}
175175

176-
inline void
176+
static void
177177
CopyDonePeek(FILE *fp, int c, int pickup)
178178
{
179179
if (!fp)

src/backend/lib/stringinfo.c

+3-1
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+
#ifdef NOT_USED
2223
/*
2324
* makeStringInfo
2425
*
@@ -37,6 +38,7 @@ makeStringInfo(void)
3738

3839
return res;
3940
}
41+
#endif
4042

4143
/*
4244
* initStringInfo

src/backend/libpq/auth.c

+3-2
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 int pg_passwordv0_recvauth(void *arg, PacketLen len, void *pkt);
5050
static int checkPassword(Port *port, char *user, char *password);
5151
static int old_be_recvauth(Port *port);
5252
static int map_old_to_new(Port *port, UserAuth old, int status);
53+
static void auth_failed(Port *port);
5354

5455

5556
#ifdef KRB4
@@ -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+
static void
406407
auth_failed(Port *port)
407408
{
408409
char buffer[512];

src/backend/nodes/freefuncs.c

+3-2
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+
static void freeObject(void *obj);
3839

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

src/backend/optimizer/path/joinrels.c

+6-3
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
static bool is_subset(List *s1, List *s2);
2929
static void set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel,
3030
RelOptInfo *inner_rel, JoinInfo *jinfo);
31+
static RelOptInfo *make_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel,
32+
JoinInfo *joininfo);
33+
static List *new_join_tlist(List *tlist, int first_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+
static RelOptInfo *
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+
static List *
269272
new_join_tlist(List *tlist,
270273
int first_resdomno)
271274
{

src/backend/optimizer/plan/setrefs.c

+5-2
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
static List *pull_agg_clause(Node *clause);
4848
static Node *del_agg_clause(Node *clause);
4949
static void set_result_tlist_references(Result *resultNode);
50+
static void replace_vars_with_subplan_refs(Node *clause,
51+
Index subvarno,
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+
static void
607610
replace_vars_with_subplan_refs(Node *clause,
608611
Index subvarno,
609612
List *subplanTargetList)

src/backend/parser/parse_clause.c

+10-8
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
static void parseFromClause(ParseState *pstate, List *frmList, Node **qual);
4343

44-
Attr *makeAttr(char *relname, char *attname);
45-
4644
#ifdef ENABLE_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+
static char *transformTableEntry(ParseState *pstate, RangeVar *r);
5250

5351

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

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

139138
return a;
140139
}
140+
#endif
141141

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

207207
#endif
208208

209-
char *
209+
static char *
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+
#ifdef NOT_USED
748+
static List *
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
return NIL;
835-
} /* transformUnionClause() */
836+
}
837+
#endif

src/backend/parser/parse_expr.c

+3-2
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
static Node *parser_typecast(Value *expr, TypeName *typename, int32 atttypmod);
36+
static Node *transformIdent(ParseState *pstate, Node *expr, int precedence);
3637

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

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

0 commit comments

Comments
 (0)