Skip to content

Commit 4b2b859

Browse files
committed
Compile and warning cleanup
1 parent d79bb2f commit 4b2b859

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+342
-228
lines changed

src/backend/bootstrap/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for the bootstrap module
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.1 1996/10/27 09:46:59 bryanh Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.2 1996/11/08 05:55:46 momjian Exp $
88
#
99
#
1010
# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
@@ -26,7 +26,7 @@ INCLUDE_OPT = -I.. \
2626
-I../include \
2727
-I../../include
2828

29-
CFLAGS += $(INCLUDE_OPT)
29+
CFLAGS += $(INCLUDE_OPT) -Wno-error
3030

3131
BOOTYACCS = bootstrap_tokens.h bootparse.c
3232

src/backend/commands/define.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.6 1996/11/06 08:21:34 scrappy Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.7 1996/11/08 05:55:49 momjian Exp $
1313
*
1414
* DESCRIPTION
1515
* The "DefineFoo" routines take the parse tree and pick out the
@@ -136,8 +136,9 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
136136
*/
137137
*byte_pct_p = atoi(param->val);
138138
} else if (strcasecmp(param->name, "perbyte_cpu") == 0) {
139+
count = 0;
139140
if (sscanf(param->val, "%d", perbyte_cpu_p) == 0) {
140-
for (count = 0, ptr = param->val; *ptr != '\0'; ptr++)
141+
for (ptr = param->val; *ptr != '\0'; ptr++)
141142
if (*ptr == '!') count++;
142143
}
143144
*perbyte_cpu_p = (int) pow(10.0, (double) count);

src/backend/executor/execJunk.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.2 1996/10/31 10:11:23 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.3 1996/11/08 05:55:55 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include "postgres.h"
1616

1717
#include "utils/palloc.h"
18+
#include "access/heaptuple.h"
19+
#include "access/heapam.h"
1820
#include "executor/executor.h"
1921
#include "nodes/relation.h"
2022
#include "optimizer/tlist.h" /* for MakeTLE */

src/backend/executor/execTuples.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.2 1996/10/31 10:11:38 scrappy Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.3 1996/11/08 05:56:01 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -116,6 +116,8 @@
116116
* and the TupleTableSlot node in execnodes.h.
117117
*
118118
*/
119+
#include <string.h>
120+
119121
#include "postgres.h"
120122

121123

src/backend/executor/nodeGroup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
* columns. (ie. tuples from the same group are consecutive)
1414
*
1515
* IDENTIFICATION
16-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.2 1996/10/31 10:11:59 scrappy Exp $
16+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.3 1996/11/08 05:56:08 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
2020
#include "postgres.h"
2121

2222
#include "access/heapam.h"
2323
#include "catalog/catalog.h"
24+
#include "access/printtup.h"
2425
#include "executor/executor.h"
2526
#include "executor/nodeGroup.h"
2627

src/backend/executor/nodeNestloop.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.2 1996/10/31 10:12:14 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.3 1996/11/08 05:56:15 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -20,6 +20,7 @@
2020
#include "postgres.h"
2121

2222
#include "executor/executor.h"
23+
#include "executor/execdebug.h"
2324
#include "executor/nodeNestloop.h"
2425
#include "executor/nodeIndexscan.h"
2526

src/backend/executor/nodeSeqscan.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.2 1996/10/31 10:12:20 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.3 1996/11/08 05:56:16 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -25,7 +25,9 @@
2525
#include "postgres.h"
2626

2727
#include "executor/executor.h"
28+
#include "executor/execdebug.h"
2829
#include "executor/nodeSeqscan.h"
30+
#include "access/heapam.h"
2931
#include "parser/parsetree.h"
3032

3133
/* ----------------------------------------------------------------

src/backend/executor/nodeSort.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.3 1996/10/31 10:12:22 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.4 1996/11/08 05:56:17 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include "postgres.h"
1515

1616
#include "executor/executor.h"
17+
#include "executor/execdebug.h"
1718
#include "executor/nodeSort.h"
19+
#include "access/heapam.h"
1820
#include "utils/palloc.h"
1921
#include "utils/psort.h"
2022
#include "catalog/catalog.h"
23+
#include "catalog/heap.h"
2124
#include "storage/bufmgr.h"
2225
#include "optimizer/internal.h" /* for _TEMP_RELATION_ID_ */
2326

src/backend/executor/nodeUnique.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.3 1996/10/31 10:12:26 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.4 1996/11/08 05:56:19 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -27,6 +27,8 @@
2727
#include "executor/executor.h"
2828
#include "executor/nodeUnique.h"
2929
#include "optimizer/clauses.h"
30+
#include "access/heapam.h"
31+
#include "access/heaptuple.h"
3032
#include "access/printtup.h" /* for typtoout() */
3133
#include "utils/builtins.h" /* for namecpy()*/
3234

@@ -128,6 +130,10 @@ ExecUnique(Unique *node)
128130
tupDesc = ExecGetResultType(uniquestate);
129131
typoutput = typtoout((Oid)tupDesc->attrs[uniqueAttrNum-1]->atttypid);
130132
}
133+
else { /* keep compiler quiet */
134+
tupDesc = NULL;
135+
typoutput = 0;
136+
}
131137

132138
/* ----------------
133139
* now loop, returning only non-duplicate tuples.

src/backend/libpq/pqcomm.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/libpq/pqcomm.c,v 1.5 1996/11/06 08:48:30 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.6 1996/11/08 05:56:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -181,7 +181,7 @@ pq_flush()
181181
int
182182
pq_getstr(char *s, int maxlen)
183183
{
184-
int c;
184+
int c = '\0';
185185

186186
if (Pfin == (FILE *) NULL) {
187187
/* elog(DEBUG, "Input descriptor is null"); */
@@ -266,7 +266,7 @@ PQputline(char *s)
266266
int
267267
pq_getnchar(char *s, int off, int maxlen)
268268
{
269-
int c;
269+
int c = '\0';
270270

271271
if (Pfin == (FILE *) NULL) {
272272
/* elog(DEBUG, "Input descriptor is null"); */

0 commit comments

Comments
 (0)