Skip to content

Commit 9392299

Browse files
committed
Clean up some minor gcc warnings.
1 parent c16afb4 commit 9392299

File tree

6 files changed

+15
-20
lines changed

6 files changed

+15
-20
lines changed

src/backend/commands/dbcommands.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.47 1999/12/12 05:15:10 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.48 1999/12/20 01:11:37 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include <signal.h>
1515
#include <sys/stat.h>
16+
#include <unistd.h>
1617

1718
#include "postgres.h"
1819

src/backend/commands/user.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: user.c,v 1.45 1999/12/16 17:24:13 momjian Exp $
8+
* $Id: user.c,v 1.46 1999/12/20 01:11:37 tgl Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -37,7 +37,7 @@ static void CheckPgUserAclNotNull(void);
3737
#define SQL_LENGTH 512
3838

3939
/*---------------------------------------------------------------------
40-
* UpdatePgPwdFile
40+
* update_pg_pwd
4141
*
4242
* copy the modified contents of pg_shadow to a file used by the postmaster
4343
* for user authentication. The file is stored as $PGDATA/pg_pwd.
@@ -48,12 +48,8 @@ static void CheckPgUserAclNotNull(void);
4848
*---------------------------------------------------------------------
4949
*/
5050

51-
/* This is the old name. Now uses a lower case name to be able to call this
52-
from SQL. */
53-
#define UpdatePgPwdFile() update_pg_pwd()
54-
5551
void
56-
update_pg_pwd()
52+
update_pg_pwd(void)
5753
{
5854
char *filename,
5955
*tempname;
@@ -242,7 +238,7 @@ DefineUser(CreateUserStmt *stmt, CommandDest dest)
242238
* we can be sure no other backend will try to write the flat
243239
* file at the same time.
244240
*/
245-
UpdatePgPwdFile();
241+
update_pg_pwd();
246242

247243
/*
248244
* Now we can clean up.
@@ -391,7 +387,7 @@ AlterUser(AlterUserStmt *stmt, CommandDest dest)
391387
* we can be sure no other backend will try to write the flat
392388
* file at the same time.
393389
*/
394-
UpdatePgPwdFile();
390+
update_pg_pwd();
395391

396392
/*
397393
* Now we can clean up.
@@ -524,7 +520,7 @@ RemoveUser(char *user, CommandDest dest)
524520
* we can be sure no other backend will try to write the flat
525521
* file at the same time.
526522
*/
527-
UpdatePgPwdFile();
523+
update_pg_pwd();
528524

529525
/*
530526
* Now we can clean up.
@@ -758,7 +754,6 @@ AlterGroup(AlterGroupStmt *stmt, CommandDest dest)
758754
*/
759755
if (stmt->action == 0) /* change sysid */
760756
{
761-
bool sysid_exists = false;
762757
ScanKeyData keys[2];
763758
HeapTuple tuple;
764759
HeapScanDesc scan;

src/backend/executor/nodeTidscan.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.2 1999/12/16 22:19:44 wieck Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.3 1999/12/20 01:14:33 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -104,8 +104,6 @@ TidNext(TidScan *node)
104104
if (estate->es_evTuple != NULL &&
105105
estate->es_evTuple[node->scan.scanrelid - 1] != NULL)
106106
{
107-
int iptr, numQuals;
108-
109107
ExecClearTuple(slot);
110108
if (estate->es_evTupleNull[node->scan.scanrelid - 1])
111109
return slot; /* return empty slot */

src/backend/tcop/pquery.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.28 1999/09/24 00:24:53 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.29 1999/12/20 01:19:11 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -54,7 +54,6 @@ EState *
5454
CreateExecutorState(void)
5555
{
5656
EState *state;
57-
extern int NBuffers;
5857

5958
/* ----------------
6059
* create a new executor state

src/backend/utils/adt/tid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.12 1999/10/11 06:28:26 inoue Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.13 1999/12/20 01:23:04 tgl Exp $
1111
*
1212
* NOTES
1313
* input routine largely stolen from boxin().
@@ -144,7 +144,7 @@ text_tid(const text *string)
144144

145145
if (!string) return (ItemPointer)0;
146146

147-
str = textout(string);
147+
str = textout((text *) string);
148148
result = tidin(str);
149149
pfree(str);
150150

@@ -188,7 +188,7 @@ currtid_byrelname(const text *relname, ItemPointer tid)
188188

189189
if (!relname) return result;
190190

191-
str = textout(relname);
191+
str = textout((text *) relname);
192192

193193
result = (ItemPointer) palloc(sizeof(ItemPointerData));
194194
ItemPointerSetInvalid(result);

src/include/commands/user.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ extern void CreateGroup(CreateGroupStmt *stmt, CommandDest dest);
2121
extern void AlterGroup(AlterGroupStmt *stmt, CommandDest dest);
2222
extern void DropGroup(DropGroupStmt *stmt, CommandDest dest);
2323

24+
extern void update_pg_pwd(void);
25+
2426
#endif /* USER_H */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy