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

Commit fcd1b0d

Browse files
committed
Mark a few functions as static or NOT_USED.
1 parent 84e6042 commit fcd1b0d

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+
#ifdef NOT_USED
927928
void
928929
AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
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+
#ifdef NOT_USED
555556
void
556557
RenameRewriteRule(Oid owningRel, const char *oldName,
557558
const char *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
static void _die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt, va_list ap);
7070

7171
static void dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim);
72+
static OutputContext SetOutput(ArchiveHandle *AH, char *filename, int compression);
73+
static void ResetOutput(ArchiveHandle *AH, OutputContext savedContext);
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+
static OutputContext
864866
SetOutput(ArchiveHandle *AH, char *filename, int compression)
865867
{
866868
OutputContext sav;
@@ -912,7 +914,7 @@ SetOutput(ArchiveHandle *AH, char *filename, int compression)
912914
return sav;
913915
}
914916

915-
void
917+
static void
916918
ResetOutput(ArchiveHandle *AH, OutputContext sav)
917919
{
918920
int res;
@@ -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+
static int
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
extern bool isValidTarHeader(char *header);
355355

356-
extern OutputContext SetOutput(ArchiveHandle *AH, char *filename, int compression);
357-
extern void ResetOutput(ArchiveHandle *AH, OutputContext savedContext);
358-
extern int RestoringToDB(ArchiveHandle *AH);
359356
extern int ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *newUser);
360357

361358
int ahwrite(const void *ptr, size_t size, size_t nmemb, 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+
static int
287287
ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, 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
#ifndef PG_BACKUP_DB_H
99
#define PG_BACKUP_DB_H
1010

1111
#include "pg_backup_archiver.h"
1212

13-
extern int ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc);
1413
extern int ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qry, size_t bufLen);
1514

1615
extern void StartTransaction(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
static bool do_edit(const char *filename_arg, PQExpBuffer query_buf);
5656
static bool do_connect(char *dbname, char *user, char *host, char *port);
5757
static bool do_shell(const char *command);
58+
static void SyncVerbosityVariable(void);
59+
5860

5961

6062
/*----------
@@ -1175,7 +1177,7 @@ UnsyncVariables(void)
11751177
/*
11761178
* Update connection state from VERBOSITY variable
11771179
*/
1178-
void
1180+
static void
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
#ifndef COMMAND_H
99
#define COMMAND_H
@@ -38,6 +38,4 @@ extern void SyncVariables(void);
3838

3939
extern void UnsyncVariables(void);
4040

41-
extern void SyncVerbosityVariable(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
extern void RemoveOpClassById(Oid opclassOid);
8383
extern void RenameOpClass(List *name, const char *access_method, const char *newname);
8484
extern void AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId);
85-
extern void AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId);
8685

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

0 commit comments

Comments
 (0)