summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane1999-12-20 01:23:04 +0000
committerTom Lane1999-12-20 01:23:04 +0000
commit939229904a78c16187106461ee6e83755d3aeb3b (patch)
treef56925d1750ab191d59d5ed163cdfe8e877d36e3
parentc16afb4e24d8d3a3182938bfe78c72d4a73a16a0 (diff)
Clean up some minor gcc warnings.
-rw-r--r--src/backend/commands/dbcommands.c3
-rw-r--r--src/backend/commands/user.c17
-rw-r--r--src/backend/executor/nodeTidscan.c4
-rw-r--r--src/backend/tcop/pquery.c3
-rw-r--r--src/backend/utils/adt/tid.c6
-rw-r--r--src/include/commands/user.h2
6 files changed, 15 insertions, 20 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index f78a90ec0c8..4565e25a9c4 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -7,12 +7,13 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.47 1999/12/12 05:15:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.48 1999/12/20 01:11:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include <signal.h>
#include <sys/stat.h>
+#include <unistd.h>
#include "postgres.h"
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index cec646fc9a9..056d3458381 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: user.c,v 1.45 1999/12/16 17:24:13 momjian Exp $
+ * $Id: user.c,v 1.46 1999/12/20 01:11:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,7 +37,7 @@ static void CheckPgUserAclNotNull(void);
#define SQL_LENGTH 512
/*---------------------------------------------------------------------
- * UpdatePgPwdFile
+ * update_pg_pwd
*
* copy the modified contents of pg_shadow to a file used by the postmaster
* for user authentication. The file is stored as $PGDATA/pg_pwd.
@@ -48,12 +48,8 @@ static void CheckPgUserAclNotNull(void);
*---------------------------------------------------------------------
*/
-/* This is the old name. Now uses a lower case name to be able to call this
- from SQL. */
-#define UpdatePgPwdFile() update_pg_pwd()
-
void
-update_pg_pwd()
+update_pg_pwd(void)
{
char *filename,
*tempname;
@@ -242,7 +238,7 @@ DefineUser(CreateUserStmt *stmt, CommandDest dest)
* we can be sure no other backend will try to write the flat
* file at the same time.
*/
- UpdatePgPwdFile();
+ update_pg_pwd();
/*
* Now we can clean up.
@@ -391,7 +387,7 @@ AlterUser(AlterUserStmt *stmt, CommandDest dest)
* we can be sure no other backend will try to write the flat
* file at the same time.
*/
- UpdatePgPwdFile();
+ update_pg_pwd();
/*
* Now we can clean up.
@@ -524,7 +520,7 @@ RemoveUser(char *user, CommandDest dest)
* we can be sure no other backend will try to write the flat
* file at the same time.
*/
- UpdatePgPwdFile();
+ update_pg_pwd();
/*
* Now we can clean up.
@@ -758,7 +754,6 @@ AlterGroup(AlterGroupStmt *stmt, CommandDest dest)
*/
if (stmt->action == 0) /* change sysid */
{
- bool sysid_exists = false;
ScanKeyData keys[2];
HeapTuple tuple;
HeapScanDesc scan;
diff --git a/src/backend/executor/nodeTidscan.c b/src/backend/executor/nodeTidscan.c
index 6a9e7e5e070..5113502fffe 100644
--- a/src/backend/executor/nodeTidscan.c
+++ b/src/backend/executor/nodeTidscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.2 1999/12/16 22:19:44 wieck Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.3 1999/12/20 01:14:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,8 +104,6 @@ TidNext(TidScan *node)
if (estate->es_evTuple != NULL &&
estate->es_evTuple[node->scan.scanrelid - 1] != NULL)
{
- int iptr, numQuals;
-
ExecClearTuple(slot);
if (estate->es_evTupleNull[node->scan.scanrelid - 1])
return slot; /* return empty slot */
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index cbbe82eb3b5..df20e6538b7 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.28 1999/09/24 00:24:53 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.29 1999/12/20 01:19:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,7 +54,6 @@ EState *
CreateExecutorState(void)
{
EState *state;
- extern int NBuffers;
/* ----------------
* create a new executor state
diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c
index 93fb33f8a95..dc243205e91 100644
--- a/src/backend/utils/adt/tid.c
+++ b/src/backend/utils/adt/tid.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.12 1999/10/11 06:28:26 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.13 1999/12/20 01:23:04 tgl Exp $
*
* NOTES
* input routine largely stolen from boxin().
@@ -144,7 +144,7 @@ text_tid(const text *string)
if (!string) return (ItemPointer)0;
- str = textout(string);
+ str = textout((text *) string);
result = tidin(str);
pfree(str);
@@ -188,7 +188,7 @@ currtid_byrelname(const text *relname, ItemPointer tid)
if (!relname) return result;
- str = textout(relname);
+ str = textout((text *) relname);
result = (ItemPointer) palloc(sizeof(ItemPointerData));
ItemPointerSetInvalid(result);
diff --git a/src/include/commands/user.h b/src/include/commands/user.h
index 912a5a2ea7a..86a094b0859 100644
--- a/src/include/commands/user.h
+++ b/src/include/commands/user.h
@@ -21,4 +21,6 @@ extern void CreateGroup(CreateGroupStmt *stmt, CommandDest dest);
extern void AlterGroup(AlterGroupStmt *stmt, CommandDest dest);
extern void DropGroup(DropGroupStmt *stmt, CommandDest dest);
+extern void update_pg_pwd(void);
+
#endif /* USER_H */