Skip to content

Commit 20ad43b

Browse files
committed
Mark functions as static and ifdef NOT_USED as appropriate.
1 parent 5690933 commit 20ad43b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+188
-175
lines changed

src/backend/access/index/istrat.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.44 2000/05/30 04:24:32 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.45 2000/06/08 22:36:51 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -207,6 +207,7 @@ StrategyEvaluationIsValid(StrategyEvaluation evaluation)
207207

208208
#endif
209209

210+
#ifdef NOT_USED
210211
/* ----------------
211212
* StrategyTermEvaluate
212213
* ----------------
@@ -262,7 +263,7 @@ StrategyTermEvaluate(StrategyTerm term,
262263

263264
return result;
264265
}
265-
266+
#endif
266267

267268
/* ----------------
268269
* RelationGetStrategy
@@ -340,6 +341,7 @@ RelationGetStrategy(Relation relation,
340341
return strategy;
341342
}
342343

344+
#ifdef NOT_USED
343345
/* ----------------
344346
* RelationInvokeStrategy
345347
* ----------------
@@ -463,6 +465,7 @@ RelationInvokeStrategy(Relation relation,
463465

464466

465467
}
468+
#endif
466469

467470
/* ----------------
468471
* OperatorRelationFillScanKeyEntry

src/backend/access/nbtree/nbtinsert.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.58 2000/05/30 04:24:33 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.59 2000/06/08 22:36:52 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -30,6 +30,8 @@ static OffsetNumber _bt_pgaddtup(Relation rel, Buffer buf, int keysz, ScanKey it
3030
static bool _bt_goesonpg(Relation rel, Buffer buf, Size keysz, ScanKey scankey, BTItem afteritem);
3131
static void _bt_updateitem(Relation rel, Size keysz, Buffer buf, BTItem oldItem, BTItem newItem);
3232
static bool _bt_isequal(TupleDesc itupdesc, Page page, OffsetNumber offnum, int keysz, ScanKey scankey);
33+
static int32 _bt_tuplecompare(Relation rel, Size keysz, ScanKey scankey,
34+
IndexTuple tuple1, IndexTuple tuple2);
3335

3436
/*
3537
* _bt_doinsert() -- Handle insertion of a single btitem in the tree.
@@ -1360,7 +1362,7 @@ _bt_goesonpg(Relation rel,
13601362
* return -1, 0, or +1
13611363
*
13621364
*/
1363-
int32
1365+
static int32
13641366
_bt_tuplecompare(Relation rel,
13651367
Size keysz,
13661368
ScanKey scankey,

src/backend/access/transam/xact.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.65 2000/05/30 00:49:41 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.66 2000/06/08 22:36:54 momjian Exp $
1212
*
1313
* NOTES
1414
* Transaction aborts can now occur two ways:
@@ -901,6 +901,7 @@ StartTransaction()
901901

902902
}
903903

904+
#ifdef NOT_USED
904905
/* ---------------
905906
* Tell me if we are currently in progress
906907
* ---------------
@@ -910,6 +911,7 @@ CurrentXactInProgress()
910911
{
911912
return CurrentTransactionState->state == TRANS_INPROGRESS;
912913
}
914+
#endif
913915

914916
/* --------------------------------
915917
* CommitTransaction

src/backend/catalog/index.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.113 2000/05/30 04:24:35 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.114 2000/06/08 22:36:59 momjian Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -75,6 +75,7 @@ static void DefaultBuild(Relation heapRelation, Relation indexRelation,
7575
IndexStrategy indexStrategy, uint16 parameterCount,
7676
Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
7777
static Oid IndexGetRelation(Oid indexId);
78+
static bool activate_index(Oid indexId, bool activate);
7879

7980
static bool reindexing = false;
8081
extern bool
@@ -2044,7 +2045,7 @@ IndexIsUniqueNoCache(Oid indexId)
20442045
* status per index
20452046
* ---------------------------------
20462047
*/
2047-
bool
2048+
static bool
20482049
activate_index(Oid indexId, bool activate)
20492050
{
20502051
if (!activate) /* Currently does nothing */

src/backend/commands/async.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.64 2000/06/07 04:09:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.65 2000/06/08 22:37:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -193,14 +193,11 @@ Async_Listen(char *relname, int pid)
193193
{
194194
Relation lRel;
195195
TupleDesc tdesc;
196-
HeapScanDesc scan;
197196
HeapTuple tuple,
198197
newtup;
199198
Datum values[Natts_pg_listener];
200199
char nulls[Natts_pg_listener];
201-
Datum d;
202200
int i;
203-
bool isnull;
204201
TupleDesc tupDesc;
205202

206203
if (Trace_notify)

src/backend/commands/comment.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ static void CommentAggregate(char *aggregate, char *aggtype, char *comment);
4949
static void CommentProc(char *function, List *arguments, char *comment);
5050
static void CommentOperator(char *opname, List *arguments, char *comment);
5151
static void CommentTrigger(char *trigger, char *relation, char *comments);
52+
static void CreateComments(Oid oid, char *comment);
5253

5354
/*------------------------------------------------------------------
5455
* CommentObject --
@@ -120,7 +121,7 @@ CommentObject(int objtype, char *objname, char *objproperty,
120121
*------------------------------------------------------------------
121122
*/
122123

123-
void
124+
static void
124125
CreateComments(Oid oid, char *comment)
125126
{
126127

src/backend/commands/trigger.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.68 2000/05/30 00:49:43 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.69 2000/06/08 22:37:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -38,6 +38,9 @@ static HeapTuple GetTupleForTrigger(EState *estate, ItemPointer tid,
3838
static HeapTuple ExecCallTriggerFunc(Trigger *trigger,
3939
TriggerData *trigdata);
4040

41+
static void DeferredTriggerSaveEvent(Relation rel, int event,
42+
HeapTuple oldtup, HeapTuple newtup);
43+
4144

4245
void
4346
CreateTrigger(CreateTrigStmt *stmt)
@@ -1776,7 +1779,7 @@ DeferredTriggerSetState(ConstraintsSetStmt *stmt)
17761779
* Called by ExecAR...Triggers() to add the event to the queue.
17771780
* ----------
17781781
*/
1779-
void
1782+
static void
17801783
DeferredTriggerSaveEvent(Relation rel, int event,
17811784
HeapTuple oldtup, HeapTuple newtup)
17821785
{

src/backend/executor/nodeTidscan.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.7 2000/05/30 00:49:45 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.8 2000/06/08 22:37:03 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -20,7 +20,6 @@
2020
* ExecTidReScan rescans the tid relation.
2121
* ExecEndTidScan releases all storage.
2222
* ExecTidMarkPos marks scan position.
23-
* ExecTidRestrPos restores scan position.
2423
*
2524
*/
2625
#include "postgres.h"
@@ -353,6 +352,7 @@ ExecTidMarkPos(TidScan *node)
353352
tidstate->tss_MarkTidPtr = tidstate->tss_TidPtr;
354353
}
355354

355+
#ifdef NOT_USED
356356
/* ----------------------------------------------------------------
357357
* ExecTidRestrPos
358358
*
@@ -370,6 +370,7 @@ ExecTidRestrPos(TidScan *node)
370370
tidstate = node->tidstate;
371371
tidstate->tss_TidPtr = tidstate->tss_MarkTidPtr;
372372
}
373+
#endif
373374

374375
/* ----------------------------------------------------------------
375376
* ExecInitTidScan

src/backend/lib/dllist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.17 2000/04/12 17:15:10 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.18 2000/06/08 22:37:05 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -109,11 +109,13 @@ DLGetTailVal(Dllist *l)
109109

110110
#endif
111111

112+
#ifdef NOT_USED
112113
Dlelem *
113114
DLGetPred(Dlelem *e) /* get predecessor */
114115
{
115116
return e ? e->dle_prev : 0;
116117
}
118+
#endif
117119

118120
Dlelem *
119121
DLGetSucc(Dlelem *e) /* get successor */

src/backend/nodes/nodeFuncs.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.11 2000/01/26 05:56:31 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.12 2000/06/08 22:37:07 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -98,6 +98,7 @@ replace_opid(Oper *oper)
9898
* constant (CONST, PARAM) nodes
9999
*****************************************************************************/
100100

101+
#ifdef NOT_USED
101102
/*
102103
* non_null -
103104
* Returns t if the node is a non-null constant, e.g., if the node has a
@@ -113,3 +114,5 @@ non_null(Expr *c)
113114
else
114115
return false;
115116
}
117+
#endif
118+

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