Mark a few functions as static or NOT_USED.

This commit is contained in:
Bruce Momjian 2006-07-18 17:42:01 +00:00
parent 84e6042725
commit fcd1b0d891
9 changed files with 22 additions and 21 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.47 2006/07/14 14:52:18 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.48 2006/07/18 17:42:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -924,6 +924,7 @@ RenameOpClass(List *name, const char *access_method, const char *newname)
/*
* Change opclass owner by oid
*/
#ifdef NOT_USED
void
AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
{
@ -943,6 +944,7 @@ AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
heap_freetuple(tup);
heap_close(rel, NoLock);
}
#endif
/*
* Change opclass owner by name

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.110 2006/07/14 14:52:22 momjian Exp $
* $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.111 2006/07/18 17:42:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -552,6 +552,7 @@ setRuleCheckAsUser_walker(Node *node, Oid *context)
*
* This is unused code at the moment.
*/
#ifdef NOT_USED
void
RenameRewriteRule(Oid owningRel, const char *oldName,
const char *newName)
@ -588,3 +589,4 @@ RenameRewriteRule(Oid owningRel, const char *oldName,
heap_freetuple(ruletup);
heap_close(pg_rewrite_desc, RowExclusiveLock);
}
#endif

View File

@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.133 2006/07/14 14:52:26 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.134 2006/07/18 17:42:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -69,6 +69,8 @@ static void _write_msg(const char *modulename, const char *fmt, va_list ap);
static void _die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt, va_list ap);
static void dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim);
static OutputContext SetOutput(ArchiveHandle *AH, char *filename, int compression);
static void ResetOutput(ArchiveHandle *AH, OutputContext savedContext);
/*
@ -860,7 +862,7 @@ archprintf(Archive *AH, const char *fmt,...)
* Stuff below here should be 'private' to the archiver routines
*******************************/
OutputContext
static OutputContext
SetOutput(ArchiveHandle *AH, char *filename, int compression)
{
OutputContext sav;
@ -912,7 +914,7 @@ SetOutput(ArchiveHandle *AH, char *filename, int compression)
return sav;
}
void
static void
ResetOutput(ArchiveHandle *AH, OutputContext sav)
{
int res;
@ -985,7 +987,7 @@ ahlog(ArchiveHandle *AH, int level, const char *fmt,...)
/*
* Single place for logic which says 'We are restoring to a direct DB connection'.
*/
int
static int
RestoringToDB(ArchiveHandle *AH)
{
return (AH->ropt && AH->ropt->useDB && AH->connection);

View File

@ -17,7 +17,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.71 2006/07/11 13:54:24 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.72 2006/07/18 17:42:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -353,9 +353,6 @@ extern void InitArchiveFmt_Tar(ArchiveHandle *AH);
extern bool isValidTarHeader(char *header);
extern OutputContext SetOutput(ArchiveHandle *AH, char *filename, int compression);
extern void ResetOutput(ArchiveHandle *AH, OutputContext savedContext);
extern int RestoringToDB(ArchiveHandle *AH);
extern int ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *newUser);
int ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);

View File

@ -5,7 +5,7 @@
* Implements the basic DB functions used by the archiver.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.72 2006/07/14 14:52:26 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.73 2006/07/18 17:42:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -283,7 +283,7 @@ notice_processor(void *arg, const char *message)
/* Public interface */
/* Convenience function to send a query. Monitors result to handle COPY statements */
int
static int
ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc)
{
PGconn *conn = AH->connection;

View File

@ -2,7 +2,7 @@
* Definitions for pg_backup_db.c
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.12 2006/07/11 13:54:24 momjian Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.13 2006/07/18 17:42:01 momjian Exp $
*/
#ifndef PG_BACKUP_DB_H
@ -10,7 +10,6 @@
#include "pg_backup_archiver.h"
extern int ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc);
extern int ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qry, size_t bufLen);
extern void StartTransaction(ArchiveHandle *AH);

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.170 2006/06/11 23:06:00 tgl Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.171 2006/07/18 17:42:01 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@ -55,6 +55,8 @@ static backslashResult exec_command(const char *cmd,
static bool do_edit(const char *filename_arg, PQExpBuffer query_buf);
static bool do_connect(char *dbname, char *user, char *host, char *port);
static bool do_shell(const char *command);
static void SyncVerbosityVariable(void);
/*----------
@ -1175,7 +1177,7 @@ UnsyncVariables(void)
/*
* Update connection state from VERBOSITY variable
*/
void
static void
SyncVerbosityVariable(void)
{
switch (SwitchVariable(pset.vars, "VERBOSITY",

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.26 2006/07/14 14:52:26 momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.27 2006/07/18 17:42:01 momjian Exp $
*/
#ifndef COMMAND_H
#define COMMAND_H
@ -38,6 +38,4 @@ extern void SyncVariables(void);
extern void UnsyncVariables(void);
extern void SyncVerbosityVariable(void);
#endif /* COMMAND_H */

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.74 2006/07/03 22:45:40 tgl Exp $
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.75 2006/07/18 17:42:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -82,7 +82,6 @@ extern void RemoveOpClass(RemoveOpClassStmt *stmt);
extern void RemoveOpClassById(Oid opclassOid);
extern void RenameOpClass(List *name, const char *access_method, const char *newname);
extern void AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId);
extern void AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId);
/* support routines in commands/define.c */