OSDN Git Service

Clean up some minor gcc warnings.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Dec 1999 01:23:04 +0000 (01:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 20 Dec 1999 01:23:04 +0000 (01:23 +0000)
src/backend/commands/dbcommands.c
src/backend/commands/user.c
src/backend/executor/nodeTidscan.c
src/backend/tcop/pquery.c
src/backend/utils/adt/tid.c
src/include/commands/user.h

index f78a90e..4565e25 100644 (file)
@@ -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"
 
index cec646f..056d345 100644 (file)
@@ -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;
index 6a9e7e5..5113502 100644 (file)
@@ -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 */
index cbbe82e..df20e65 100644 (file)
@@ -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
index 93fb33f..dc24320 100644 (file)
@@ -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);
index 912a5a2..86a094b 100644 (file)
@@ -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 */