mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Major code cleanups from D'arcy (-Wall -Werror)
This commit is contained in:
@@ -8,10 +8,12 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.3 1996/10/21 08:31:21 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.4 1996/10/23 07:39:39 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <time.h>
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#include "storage/block.h"
|
||||
@@ -34,7 +36,6 @@
|
||||
#include "bootstrap/bootstrap.h"
|
||||
|
||||
#include "nodes/primnodes.h"
|
||||
#include <time.h>
|
||||
#include "utils/nabstime.h"
|
||||
#include "access/htup.h"
|
||||
#include "utils/tqual.h"
|
||||
@@ -44,6 +45,8 @@
|
||||
|
||||
#include "bootstrap_tokens.h"
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
/* some versions of lex define this as a macro */
|
||||
#if defined(yywrap)
|
||||
#undef yywrap
|
||||
@@ -121,13 +124,14 @@ insert { return(INSERT_TUPLE); }
|
||||
|
||||
%%
|
||||
|
||||
yywrap()
|
||||
int
|
||||
yywrap(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
yyerror(str)
|
||||
char *str;
|
||||
void
|
||||
yyerror(const char *str)
|
||||
{
|
||||
fprintf(stderr,"\tsyntax error %d : %s",yyline, str);
|
||||
}
|
||||
|
@@ -7,10 +7,15 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.8 1996/10/21 08:31:23 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.9 1996/10/23 07:39:42 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#define BOOTSTRAP_INCLUDE /* mask out stuff in tcop/tcopprot.h */
|
||||
|
||||
#include "postgres.h"
|
||||
@@ -28,7 +33,6 @@
|
||||
#include "access/strat.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
#include <time.h>
|
||||
#include "storage/block.h"
|
||||
#include "storage/off.h"
|
||||
#include "storage/itemptr.h"
|
||||
@@ -45,10 +49,6 @@
|
||||
|
||||
#include "nodes/memnodes.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "miscadmin.h"
|
||||
|
||||
#include "catalog/pg_type.h"
|
||||
@@ -101,6 +101,8 @@
|
||||
#define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t))
|
||||
#define FIRST_TYPE_OID 16 /* OID of the first type */
|
||||
|
||||
extern int Int_yyparse (void);
|
||||
|
||||
/* ----------------
|
||||
* global variables
|
||||
* ----------------
|
||||
@@ -235,7 +237,8 @@ typedef void (*sig_func)();
|
||||
* error handling / abort routines
|
||||
* ----------------
|
||||
*/
|
||||
void err_out()
|
||||
void
|
||||
err_out(void)
|
||||
{
|
||||
Warnings++;
|
||||
cleanup();
|
||||
@@ -245,7 +248,7 @@ void err_out()
|
||||
usage help for the bootstrap backen
|
||||
*/
|
||||
static void
|
||||
usage()
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr,"Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] ");
|
||||
fprintf(stderr,"[-P portno] [dbName]\n");
|
||||
|
Reference in New Issue
Block a user