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

Commitfcd1b0d

Browse files
committed
Mark a few functions as static or NOT_USED.
1 parent84e6042 commitfcd1b0d

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

‎src/backend/commands/opclasscmds.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.47 2006/07/14 14:52:18 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.48 2006/07/18 17:42:00 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -924,6 +924,7 @@ RenameOpClass(List *name, const char *access_method, const char *newname)
924924
/*
925925
* Change opclass owner by oid
926926
*/
927+
#ifdefNOT_USED
927928
void
928929
AlterOpClassOwner_oid(OidopcOid,OidnewOwnerId)
929930
{
@@ -943,6 +944,7 @@ AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
943944
heap_freetuple(tup);
944945
heap_close(rel,NoLock);
945946
}
947+
#endif
946948

947949
/*
948950
* Change opclass owner by name

‎src/backend/rewrite/rewriteDefine.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.110 2006/07/14 14:52:22 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.111 2006/07/18 17:42:00 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -552,6 +552,7 @@ setRuleCheckAsUser_walker(Node *node, Oid *context)
552552
*
553553
* This is unused code at the moment.
554554
*/
555+
#ifdefNOT_USED
555556
void
556557
RenameRewriteRule(OidowningRel,constchar*oldName,
557558
constchar*newName)
@@ -588,3 +589,4 @@ RenameRewriteRule(Oid owningRel, const char *oldName,
588589
heap_freetuple(ruletup);
589590
heap_close(pg_rewrite_desc,RowExclusiveLock);
590591
}
592+
#endif

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.133 2006/07/14 14:52:26 momjian Exp $
18+
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.134 2006/07/18 17:42:00 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -69,6 +69,8 @@ static void _write_msg(const char *modulename, const char *fmt, va_list ap);
6969
staticvoid_die_horribly(ArchiveHandle*AH,constchar*modulename,constchar*fmt,va_listap);
7070

7171
staticvoiddumpTimestamp(ArchiveHandle*AH,constchar*msg,time_ttim);
72+
staticOutputContextSetOutput(ArchiveHandle*AH,char*filename,intcompression);
73+
staticvoidResetOutput(ArchiveHandle*AH,OutputContextsavedContext);
7274

7375

7476
/*
@@ -860,7 +862,7 @@ archprintf(Archive *AH, const char *fmt,...)
860862
* Stuff below here should be 'private' to the archiver routines
861863
*******************************/
862864

863-
OutputContext
865+
staticOutputContext
864866
SetOutput(ArchiveHandle*AH,char*filename,intcompression)
865867
{
866868
OutputContextsav;
@@ -912,7 +914,7 @@ SetOutput(ArchiveHandle *AH, char *filename, int compression)
912914
returnsav;
913915
}
914916

915-
void
917+
staticvoid
916918
ResetOutput(ArchiveHandle*AH,OutputContextsav)
917919
{
918920
intres;
@@ -985,7 +987,7 @@ ahlog(ArchiveHandle *AH, int level, const char *fmt,...)
985987
/*
986988
* Single place for logic which says 'We are restoring to a direct DB connection'.
987989
*/
988-
int
990+
staticint
989991
RestoringToDB(ArchiveHandle*AH)
990992
{
991993
return (AH->ropt&&AH->ropt->useDB&&AH->connection);

‎src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
*
1919
* IDENTIFICATION
20-
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.71 2006/07/11 13:54:24 momjian Exp $
20+
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.72 2006/07/18 17:42:00 momjian Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -353,9 +353,6 @@ extern void InitArchiveFmt_Tar(ArchiveHandle *AH);
353353

354354
externboolisValidTarHeader(char*header);
355355

356-
externOutputContextSetOutput(ArchiveHandle*AH,char*filename,intcompression);
357-
externvoidResetOutput(ArchiveHandle*AH,OutputContextsavedContext);
358-
externintRestoringToDB(ArchiveHandle*AH);
359356
externintReconnectToServer(ArchiveHandle*AH,constchar*dbname,constchar*newUser);
360357

361358
intahwrite(constvoid*ptr,size_tsize,size_tnmemb,ArchiveHandle*AH);

‎src/bin/pg_dump/pg_backup_db.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*Implements the basic DB functions used by the archiver.
66
*
77
* IDENTIFICATION
8-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.72 2006/07/14 14:52:26 momjian Exp $
8+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.73 2006/07/18 17:42:00 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -283,7 +283,7 @@ notice_processor(void *arg, const char *message)
283283

284284
/* Public interface */
285285
/* Convenience function to send a query. Monitors result to handle COPY statements */
286-
int
286+
staticint
287287
ExecuteSqlCommand(ArchiveHandle*AH,PQExpBufferqry,char*desc)
288288
{
289289
PGconn*conn=AH->connection;

‎src/bin/pg_dump/pg_backup_db.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
*Definitions for pg_backup_db.c
33
*
44
*IDENTIFICATION
5-
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.12 2006/07/11 13:54:24 momjian Exp $
5+
*$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.13 2006/07/18 17:42:01 momjian Exp $
66
*/
77

88
#ifndefPG_BACKUP_DB_H
99
#definePG_BACKUP_DB_H
1010

1111
#include"pg_backup_archiver.h"
1212

13-
externintExecuteSqlCommand(ArchiveHandle*AH,PQExpBufferqry,char*desc);
1413
externintExecuteSqlCommandBuf(ArchiveHandle*AH,void*qry,size_tbufLen);
1514

1615
externvoidStartTransaction(ArchiveHandle*AH);

‎src/bin/psql/command.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.170 2006/06/11 23:06:00 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.171 2006/07/18 17:42:01 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"command.h"
@@ -55,6 +55,8 @@ static backslashResult exec_command(const char *cmd,
5555
staticbooldo_edit(constchar*filename_arg,PQExpBufferquery_buf);
5656
staticbooldo_connect(char*dbname,char*user,char*host,char*port);
5757
staticbooldo_shell(constchar*command);
58+
staticvoidSyncVerbosityVariable(void);
59+
5860

5961

6062
/*----------
@@ -1175,7 +1177,7 @@ UnsyncVariables(void)
11751177
/*
11761178
* Update connection state from VERBOSITY variable
11771179
*/
1178-
void
1180+
staticvoid
11791181
SyncVerbosityVariable(void)
11801182
{
11811183
switch (SwitchVariable(pset.vars,"VERBOSITY",

‎src/bin/psql/command.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.26 2006/07/14 14:52:26 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.27 2006/07/18 17:42:01 momjian Exp $
77
*/
88
#ifndefCOMMAND_H
99
#defineCOMMAND_H
@@ -38,6 +38,4 @@ extern void SyncVariables(void);
3838

3939
externvoidUnsyncVariables(void);
4040

41-
externvoidSyncVerbosityVariable(void);
42-
4341
#endif/* COMMAND_H */

‎src/include/commands/defrem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.74 2006/07/03 22:45:40 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.75 2006/07/18 17:42:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -82,7 +82,6 @@ extern void RemoveOpClass(RemoveOpClassStmt *stmt);
8282
externvoidRemoveOpClassById(OidopclassOid);
8383
externvoidRenameOpClass(List*name,constchar*access_method,constchar*newname);
8484
externvoidAlterOpClassOwner(List*name,constchar*access_method,OidnewOwnerId);
85-
externvoidAlterOpClassOwner_oid(OidopcOid,OidnewOwnerId);
8685

8786
/* support routines in commands/define.c */
8887

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp