Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaaeef4d

Browse files
committed
All external function definitions now have prototypes that are checked.
1 parentbf5cbbf commitaaeef4d

File tree

99 files changed

+551
-322
lines changed

Some content is hidden

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

99 files changed

+551
-322
lines changed

‎src/Makefile.global

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.57 1996/11/09 10:39:02 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.58 1996/11/10 02:56:33 momjian Exp $
1111
#
1212
# NOTES
1313
# This is seen by any Makefiles that include mk/postgres.mk. To
@@ -860,7 +860,7 @@ includedir=$(HEADERDIR)
860860
# Flags for CC and LD. (depend on COPT and PROFILE)
861861
#
862862
# PostgreSQL should *always* compile with -Wall -Werror enabled
863-
CFLAGS+=-Wall #-Werror
863+
CFLAGS+=-Wall-Wmissing-prototypes -Wmissing-declarations#-Werror
864864

865865
# Globally pass debugging/optimization/profiling flags based
866866
# on the options selected above.

‎src/backend/access/common/heaptuple.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.15 1996/11/05 07:42:40 scrappy Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.16 1996/11/10 02:56:41 momjian Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -19,6 +19,7 @@
1919

2020
#include<postgres.h>
2121

22+
#include<access/heapam.h>
2223
#include<access/htup.h>
2324
#include<access/transam.h>
2425
#include<access/tupmacs.h>

‎src/backend/access/common/heapvalid.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/access/common/Attic/heapvalid.c,v 1.11 1996/11/05 07:42:41 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.12 1996/11/10 02:56:47 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -16,6 +16,7 @@
1616

1717
#include<fmgr.h>
1818
#include<access/heaptuple.h>
19+
#include<access/valid.h>
1920
#include<access/xact.h>
2021
#include<storage/bufpage.h>
2122
#include<utils/rel.h>

‎src/backend/access/common/indexvalid.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.11 1996/11/05 07:42:43 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.12 1996/11/10 02:56:51 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include<postgres.h>
1616

1717
#include<access/htup.h>
18+
#include<access/iqual.h>
1819
#include<access/itup.h>
1920
#include<access/skey.h>
2021
#include<executor/execdebug.h>

‎src/backend/access/common/printtup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.11 1996/11/05 07:42:44 scrappy Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.12 1996/11/10 02:57:00 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -17,6 +17,7 @@
1717

1818
#include<fmgr.h>
1919
#include<access/heaptuple.h>
20+
#include<access/printtup.h>
2021
#include<catalog/pg_type.h>
2122
#include<libpq/libpq.h>
2223
#include<utils/syscache.h>

‎src/backend/access/gist/gist.c

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,9 +1190,6 @@ gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
11901190

11911191
#ifdefGISTDEBUG
11921192

1193-
externchar*text_range_out();
1194-
externchar*int_range_out();
1195-
11961193
/*
11971194
** sloppy debugging support routine, requires recompilation with appropriate
11981195
** "out" method for the index keys. Could be fixed to find that info
@@ -1236,7 +1233,7 @@ _gistdump(Relation r)
12361233
datum= ((char*)itup);
12371234
datum+=sizeof(IndexTupleData);
12381235
/* get out function for type of key, and out it! */
1239-
itkey= (char*)int_range_out(datum);
1236+
itkey= (char*)int_range_out((INTRANGE*)datum);
12401237
/* itkey = " unable to print"; */
12411238
printf("\t[%d] size %d heap <%d,%d> key:%s\n",
12421239
offnum,IndexTupleSize(itup),itblkno,itoffno,itkey);
@@ -1247,26 +1244,6 @@ _gistdump(Relation r)
12471244
}
12481245
}
12491246

1250-
#defineTRLOWER(tr) (((tr)->bytes))
1251-
#defineTRUPPER(tr) (&((tr)->bytes[MAXALIGN(VARSIZE(TRLOWER(tr)))]))
1252-
typedefstructtxtrange {
1253-
/* flag: NINF means that lower is negative infinity; PINF means that
1254-
** upper is positive infinity. 0 means that both are numbers.
1255-
*/
1256-
int32vl_len;
1257-
int32flag;
1258-
charbytes[2];
1259-
}TXTRANGE;
1260-
1261-
typedefstructintrange {
1262-
intlower;
1263-
intupper;
1264-
/* flag: NINF means that lower is negative infinity; PINF means that
1265-
** upper is positive infinity. 0 means that both are numbers.
1266-
*/
1267-
intflag;
1268-
}INTRANGE;
1269-
12701247
char*text_range_out(TXTRANGE*r)
12711248
{
12721249
char*result;

‎src/backend/access/gist/gistscan.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include<postgres.h>
1414

1515
#include<access/gist.h>
16+
#include<access/gistscan.h>
1617
#include<access/genam.h>
1718
#include<access/rtree.h>
1819
#include<storage/bufmgr.h>

‎src/backend/access/hash/hashfunc.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/access/hash/hashfunc.c,v 1.2 1996/10/20 06:34:14 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.3 1996/11/10 02:57:40 momjian Exp $
1111
*
1212
* NOTES
1313
* These functions are stored in pg_amproc. For each operator class
@@ -18,6 +18,8 @@
1818

1919
#include"postgres.h"
2020

21+
#include"access/hash.h"
22+
2123
uint32hashint2(int16key)
2224
{
2325
return ((uint32) ~key);

‎src/backend/access/heap/stats.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.8 1996/11/05 11:17:47 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.9 1996/11/10 02:58:11 momjian Exp $
1111
*
1212
* NOTES
1313
* initam should be moved someplace else.
@@ -324,7 +324,7 @@ PrintAndFreeHeapAccessStatistics(HeapAccessStatistics stats)
324324
* ----------------
325325
*/
326326
void
327-
initam()
327+
initam(void)
328328
{
329329
/* ----------------
330330
*initialize heap statistics.

‎src/backend/access/nbtree/nbtcompare.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/access/nbtree/nbtcompare.c,v 1.5 1996/11/05 10:35:28 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.6 1996/11/10 02:58:37 momjian Exp $
1111
*
1212
* NOTES
1313
*These functions are stored in pg_amproc. For each operator class
@@ -24,6 +24,7 @@
2424

2525
#include<postgres.h>
2626

27+
#include<utils/builtins.h>
2728
#include<utils/nabstime.h>
2829

2930
int32

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp