From: Tom Lane Date: Mon, 20 Dec 1999 01:23:04 +0000 (+0000) Subject: Clean up some minor gcc warnings. X-Git-Tag: REL7_0~994 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=939229904a78c16187106461ee6e83755d3aeb3b;p=postgresql Clean up some minor gcc warnings. --- diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index f78a90ec0c..4565e25a9c 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 #include +#include #include "postgres.h" diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index cec646fc9a..056d345838 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 6a9e7e5e07..5113502fff 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 cbbe82eb3b..df20e6538b 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 93fb33f8a9..dc243205e9 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 912a5a2ea7..86a094b085 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 */