mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Compile and warning cleanup
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Makefile for tcop
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.3 1996/11/03 06:52:27 scrappy Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.4 1996/11/08 05:59:20 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -14,7 +14,7 @@ include ../../Makefile.global
|
||||
INCLUDE_OPT = -I../port/$(PORTNAME) \
|
||||
-I../../include
|
||||
|
||||
CFLAGS+=$(INCLUDE_OPT)
|
||||
CFLAGS+=$(INCLUDE_OPT) -Wno-error
|
||||
|
||||
OBJS = aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.3 1996/11/03 06:52:29 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.4 1996/11/08 05:59:23 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* See acl.h.
|
||||
@@ -22,12 +22,14 @@
|
||||
#include "access/htup.h"
|
||||
#include "access/tupmacs.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/memutils.h"
|
||||
#include "utils/palloc.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/catalog.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/pg_group.h"
|
||||
#include "catalog/pg_operator.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_user.h"
|
||||
#include "utils/syscache.h"
|
||||
#include "parser/catalog_utils.h"
|
||||
@@ -189,7 +191,7 @@ char*
|
||||
get_groname(AclId grosysid)
|
||||
{
|
||||
HeapTuple htp;
|
||||
char *name;
|
||||
char *name = NULL;
|
||||
|
||||
htp = SearchSysCacheTuple(GROSYSID, PointerGetDatum(grosysid),
|
||||
0,0,0);
|
||||
@@ -460,7 +462,7 @@ pg_ownercheck(char *usename,
|
||||
int cacheid)
|
||||
{
|
||||
HeapTuple htp;
|
||||
AclId user_id, owner_id;
|
||||
AclId user_id, owner_id = 0;
|
||||
|
||||
htp = SearchSysCacheTuple(USENAME, PointerGetDatum(usename),
|
||||
0,0,0);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.2 1996/11/03 06:52:32 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.3 1996/11/08 05:59:26 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This cruft is the server side of PQfn.
|
||||
@@ -57,6 +57,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "tcop/tcopdebug.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.14 1996/11/04 04:53:31 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.15 1996/11/08 05:59:31 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@@ -16,16 +16,21 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "libpq/pqsignal.h" /* substitute for <signal.h> */
|
||||
|
||||
#if defined(linux)
|
||||
#ifndef __USE_POSIX
|
||||
#define __USE_POSIX
|
||||
#endif
|
||||
#endif /* defined(linux) */
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <setjmp.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/param.h> /* for MAXHOSTNAMELEN on most */
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
#include <netdb.h> /* for MAXHOSTNAMELEN on some */
|
||||
@@ -279,7 +284,7 @@ static char
|
||||
SocketBackend(char *inBuf, int multiplexedBackend)
|
||||
{
|
||||
char qtype[2];
|
||||
char result;
|
||||
char result = '\0';
|
||||
|
||||
/* ----------------
|
||||
* get input from the frontend
|
||||
@@ -782,7 +787,7 @@ PostgresMain(int argc, char *argv[])
|
||||
int flagE;
|
||||
int flag;
|
||||
|
||||
char *DBName;
|
||||
char *DBName = NULL;
|
||||
int errs = 0;
|
||||
|
||||
char firstchar;
|
||||
@@ -793,11 +798,11 @@ PostgresMain(int argc, char *argv[])
|
||||
char* hostName; /* the host name of the backend server */
|
||||
char hostbuf[MAXHOSTNAMELEN];
|
||||
int serverSock;
|
||||
int serverPortnum;
|
||||
int serverPortnum = 0;
|
||||
int nSelected; /* number of descriptors ready from select(); */
|
||||
int maxFd; /* max file descriptor + 1 */
|
||||
int maxFd = 0; /* max file descriptor + 1 */
|
||||
fd_set rmask, basemask;
|
||||
FrontEnd *newFE, *currentFE;
|
||||
FrontEnd *newFE, *currentFE = NULL;
|
||||
int numFE = 0; /* keep track of number of active frontends */
|
||||
Port *newPort;
|
||||
int newFd;
|
||||
@@ -1157,7 +1162,8 @@ PostgresMain(int argc, char *argv[])
|
||||
#endif /* WIN32 */
|
||||
|
||||
if (multiplexedBackend) {
|
||||
if (StreamServerPort(hostName, serverPortnum, &serverSock) != STATUS_OK)
|
||||
if (serverPortnum == 0 ||
|
||||
StreamServerPort(hostName, serverPortnum, &serverSock) != STATUS_OK)
|
||||
{
|
||||
fprintf(stderr, "Postgres: cannot create stream port %d\n", serverPortnum);
|
||||
exit(1);
|
||||
@@ -1250,7 +1256,7 @@ PostgresMain(int argc, char *argv[])
|
||||
*/
|
||||
if (IsUnderPostmaster == false) {
|
||||
puts("\nPOSTGRES backend interactive interface");
|
||||
puts("$Revision: 1.14 $ $Date: 1996/11/04 04:53:31 $");
|
||||
puts("$Revision: 1.15 $ $Date: 1996/11/08 05:59:31 $");
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
@@ -1503,7 +1509,7 @@ ShowUsage()
|
||||
|
||||
fprintf(StatFp, "! system usage stats:\n");
|
||||
fprintf(StatFp,
|
||||
"!\t%d.%06d elapsed %d.%06d user %d.%06d system sec\n",
|
||||
"!\t%ld.%06ld elapsed %ld.%06ld user %ld.%06ld system sec\n",
|
||||
elapse_t.tv_sec - Save_t.tv_sec,
|
||||
elapse_t.tv_usec - Save_t.tv_usec,
|
||||
r.ru_utime.tv_sec - Save_r.ru_utime.tv_sec,
|
||||
@@ -1511,7 +1517,7 @@ ShowUsage()
|
||||
r.ru_stime.tv_sec - Save_r.ru_stime.tv_sec,
|
||||
r.ru_stime.tv_usec - Save_r.ru_stime.tv_usec);
|
||||
fprintf(StatFp,
|
||||
"!\t[%d.%06d user %d.%06d sys total]\n",
|
||||
"!\t[%ld.%06ld user %ld.%06ld sys total]\n",
|
||||
user.tv_sec, user.tv_usec, sys.tv_sec, sys.tv_usec);
|
||||
#ifndef NEED_RUSAGE
|
||||
fprintf(StatFp,
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.3 1996/11/03 06:52:35 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.4 1996/11/08 05:59:34 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "tcop/tcopdebug.h"
|
||||
@@ -209,7 +211,7 @@ ProcessQueryDesc(QueryDesc *queryDesc)
|
||||
|
||||
bool isRetrieveIntoPortal;
|
||||
bool isRetrieveIntoRelation;
|
||||
char* intoName;
|
||||
char* intoName = NULL;
|
||||
CommandDest dest;
|
||||
|
||||
/* ----------------
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.5 1996/11/03 06:52:36 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.6 1996/11/08 05:59:35 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "commands/explain.h"
|
||||
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "parse.h"
|
||||
#include "../backend/parser/parse.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/acl.h"
|
||||
#include "utils/palloc.h"
|
||||
|
||||
Reference in New Issue
Block a user