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

Commit20ad43b

Browse files
committed
Mark functions as static and ifdef NOT_USED as appropriate.
1 parent5690933 commit20ad43b

File tree

55 files changed

+188
-175
lines changed

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+
#ifdefNOT_USED
210211
/* ----------------
211212
*StrategyTermEvaluate
212213
* ----------------
@@ -262,7 +263,7 @@ StrategyTermEvaluate(StrategyTerm term,
262263

263264
returnresult;
264265
}
265-
266+
#endif
266267

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

344+
#ifdefNOT_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
staticbool_bt_goesonpg(Relationrel,Bufferbuf,Sizekeysz,ScanKeyscankey,BTItemafteritem);
3131
staticvoid_bt_updateitem(Relationrel,Sizekeysz,Bufferbuf,BTItemoldItem,BTItemnewItem);
3232
staticbool_bt_isequal(TupleDescitupdesc,Pagepage,OffsetNumberoffnum,intkeysz,ScanKeyscankey);
33+
staticint32_bt_tuplecompare(Relationrel,Sizekeysz,ScanKeyscankey,
34+
IndexTupletuple1,IndexTupletuple2);
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+
staticint32
13641366
_bt_tuplecompare(Relationrel,
13651367
Sizekeysz,
13661368
ScanKeyscankey,

‎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+
#ifdefNOT_USED
904905
/* ---------------
905906
* Tell me if we are currently in progress
906907
* ---------------
@@ -910,6 +911,7 @@ CurrentXactInProgress()
910911
{
911912
returnCurrentTransactionState->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
IndexStrategyindexStrategy,uint16parameterCount,
7676
Datum*parameter,FuncIndexInfoPtrfuncInfo,PredInfo*predInfo);
7777
staticOidIndexGetRelation(OidindexId);
78+
staticboolactivate_index(OidindexId,boolactivate);
7879

7980
staticboolreindexing= false;
8081
externbool
@@ -2044,7 +2045,7 @@ IndexIsUniqueNoCache(Oid indexId)
20442045
*status per index
20452046
* ---------------------------------
20462047
*/
2047-
bool
2048+
staticbool
20482049
activate_index(OidindexId,boolactivate)
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
RelationlRel;
195195
TupleDesctdesc;
196-
HeapScanDescscan;
197196
HeapTupletuple,
198197
newtup;
199198
Datumvalues[Natts_pg_listener];
200199
charnulls[Natts_pg_listener];
201-
Datumd;
202200
inti;
203-
boolisnull;
204201
TupleDesctupDesc;
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
staticvoidCommentProc(char*function,List*arguments,char*comment);
5050
staticvoidCommentOperator(char*opname,List*arguments,char*comment);
5151
staticvoidCommentTrigger(char*trigger,char*relation,char*comments);
52+
staticvoidCreateComments(Oidoid,char*comment);
5253

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

123-
void
124+
staticvoid
124125
CreateComments(Oidoid,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
staticHeapTupleExecCallTriggerFunc(Trigger*trigger,
3939
TriggerData*trigdata);
4040

41+
staticvoidDeferredTriggerSaveEvent(Relationrel,intevent,
42+
HeapTupleoldtup,HeapTuplenewtup);
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+
staticvoid
17801783
DeferredTriggerSaveEvent(Relationrel,intevent,
17811784
HeapTupleoldtup,HeapTuplenewtup)
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
*ExecTidReScanrescans the tid relation.
2121
*ExecEndTidScanreleases all storage.
2222
*ExecTidMarkPosmarks scan position.
23-
*ExecTidRestrPosrestores 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+
#ifdefNOT_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+
#ifdefNOT_USED
112113
Dlelem*
113114
DLGetPred(Dlelem*e)/* get predecessor */
114115
{
115116
returne ?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+
#ifdefNOT_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)

[8]ページ先頭

©2009-2025 Movatter.jp