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

Commite7128e8

Browse files
committed
Create function prototype as part of PG_FUNCTION_INFO_V1 macro
Because of gcc -Wmissing-prototypes, all functions in dynamicallyloadable modules must have a separate prototype declaration. This ismeant to detect global functions that are not declared in header files,but in cases where the function is called via dfmgr, this is redundant.Besides filling up space with boilerplate, this is a frequent source ofcompiler warnings in extension modules.We can fix that by creating the function prototype as part of thePG_FUNCTION_INFO_V1 macro, which such modules have to use anyway. Thatmakes the code of modules cleaner, because there is one less place wherethe entry points have to be listed, and creates an additional check thatfunctions have the right prototype.Remove now redundant prototypes from contrib and other modules.
1 parent0156315 commite7128e8

File tree

88 files changed

+5
-666
lines changed

Some content is hidden

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

88 files changed

+5
-666
lines changed

‎contrib/adminpack/adminpack.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040

4141
PG_MODULE_MAGIC;
4242

43-
Datumpg_file_write(PG_FUNCTION_ARGS);
44-
Datumpg_file_rename(PG_FUNCTION_ARGS);
45-
Datumpg_file_unlink(PG_FUNCTION_ARGS);
46-
Datumpg_logdir_ls(PG_FUNCTION_ARGS);
47-
4843
PG_FUNCTION_INFO_V1(pg_file_write);
4944
PG_FUNCTION_INFO_V1(pg_file_rename);
5045
PG_FUNCTION_INFO_V1(pg_file_unlink);

‎contrib/btree_gin/btree_gin.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ typedef struct QueryInfo
3232

3333
#defineGIN_EXTRACT_VALUE(type)\
3434
PG_FUNCTION_INFO_V1(gin_extract_value_##type);\
35-
Datumgin_extract_value_##type(PG_FUNCTION_ARGS);\
3635
Datum\
3736
gin_extract_value_##type(PG_FUNCTION_ARGS)\
3837
{\
@@ -59,7 +58,6 @@ gin_extract_value_##type(PG_FUNCTION_ARGS)\
5958

6059
#defineGIN_EXTRACT_QUERY(type)\
6160
PG_FUNCTION_INFO_V1(gin_extract_query_##type);\
62-
Datumgin_extract_query_##type(PG_FUNCTION_ARGS);\
6361
Datum\
6462
gin_extract_query_##type(PG_FUNCTION_ARGS)\
6563
{\
@@ -109,7 +107,6 @@ gin_extract_query_##type(PG_FUNCTION_ARGS)\
109107
*/
110108
#defineGIN_COMPARE_PREFIX(type)\
111109
PG_FUNCTION_INFO_V1(gin_compare_prefix_##type);\
112-
Datumgin_compare_prefix_##type(PG_FUNCTION_ARGS);\
113110
Datum\
114111
gin_compare_prefix_##type(PG_FUNCTION_ARGS)\
115112
{\
@@ -182,7 +179,6 @@ gin_compare_prefix_##type(PG_FUNCTION_ARGS)\
182179

183180

184181
PG_FUNCTION_INFO_V1(gin_btree_consistent);
185-
Datumgin_btree_consistent(PG_FUNCTION_ARGS);
186182
Datum
187183
gin_btree_consistent(PG_FUNCTION_ARGS)
188184
{
@@ -404,7 +400,6 @@ GIN_SUPPORT(varbit)
404400
#defineNUMERIC_IS_LEFTMOST(x)((x) == NULL)
405401

406402
PG_FUNCTION_INFO_V1(gin_numeric_cmp);
407-
Datumgin_numeric_cmp(PG_FUNCTION_ARGS);
408403

409404
Datum
410405
gin_numeric_cmp(PG_FUNCTION_ARGS)

‎contrib/btree_gist/btree_bit.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ PG_FUNCTION_INFO_V1(gbt_bit_consistent);
1919
PG_FUNCTION_INFO_V1(gbt_bit_penalty);
2020
PG_FUNCTION_INFO_V1(gbt_bit_same);
2121

22-
Datumgbt_bit_compress(PG_FUNCTION_ARGS);
23-
Datumgbt_bit_union(PG_FUNCTION_ARGS);
24-
Datumgbt_bit_picksplit(PG_FUNCTION_ARGS);
25-
Datumgbt_bit_consistent(PG_FUNCTION_ARGS);
26-
Datumgbt_bit_penalty(PG_FUNCTION_ARGS);
27-
Datumgbt_bit_same(PG_FUNCTION_ARGS);
28-
29-
3022

3123
/* define for comparison */
3224

‎contrib/btree_gist/btree_bytea.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ PG_FUNCTION_INFO_V1(gbt_bytea_consistent);
1818
PG_FUNCTION_INFO_V1(gbt_bytea_penalty);
1919
PG_FUNCTION_INFO_V1(gbt_bytea_same);
2020

21-
Datumgbt_bytea_compress(PG_FUNCTION_ARGS);
22-
Datumgbt_bytea_union(PG_FUNCTION_ARGS);
23-
Datumgbt_bytea_picksplit(PG_FUNCTION_ARGS);
24-
Datumgbt_bytea_consistent(PG_FUNCTION_ARGS);
25-
Datumgbt_bytea_penalty(PG_FUNCTION_ARGS);
26-
Datumgbt_bytea_same(PG_FUNCTION_ARGS);
27-
2821

2922
/* define for comparison */
3023

‎contrib/btree_gist/btree_cash.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_cash_distance);
2424
PG_FUNCTION_INFO_V1(gbt_cash_penalty);
2525
PG_FUNCTION_INFO_V1(gbt_cash_same);
2626

27-
Datumgbt_cash_compress(PG_FUNCTION_ARGS);
28-
Datumgbt_cash_union(PG_FUNCTION_ARGS);
29-
Datumgbt_cash_picksplit(PG_FUNCTION_ARGS);
30-
Datumgbt_cash_consistent(PG_FUNCTION_ARGS);
31-
Datumgbt_cash_distance(PG_FUNCTION_ARGS);
32-
Datumgbt_cash_penalty(PG_FUNCTION_ARGS);
33-
Datumgbt_cash_same(PG_FUNCTION_ARGS);
34-
3527
staticbool
3628
gbt_cashgt(constvoid*a,constvoid*b)
3729
{
@@ -97,7 +89,6 @@ static const gbtree_ninfo tinfo =
9789

9890

9991
PG_FUNCTION_INFO_V1(cash_dist);
100-
Datumcash_dist(PG_FUNCTION_ARGS);
10192
Datum
10293
cash_dist(PG_FUNCTION_ARGS)
10394
{

‎contrib/btree_gist/btree_date.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_date_distance);
2424
PG_FUNCTION_INFO_V1(gbt_date_penalty);
2525
PG_FUNCTION_INFO_V1(gbt_date_same);
2626

27-
Datumgbt_date_compress(PG_FUNCTION_ARGS);
28-
Datumgbt_date_union(PG_FUNCTION_ARGS);
29-
Datumgbt_date_picksplit(PG_FUNCTION_ARGS);
30-
Datumgbt_date_consistent(PG_FUNCTION_ARGS);
31-
Datumgbt_date_distance(PG_FUNCTION_ARGS);
32-
Datumgbt_date_penalty(PG_FUNCTION_ARGS);
33-
Datumgbt_date_same(PG_FUNCTION_ARGS);
34-
3527
staticbool
3628
gbt_dategt(constvoid*a,constvoid*b)
3729
{
@@ -115,7 +107,6 @@ static const gbtree_ninfo tinfo =
115107

116108

117109
PG_FUNCTION_INFO_V1(date_dist);
118-
Datumdate_dist(PG_FUNCTION_ARGS);
119110
Datum
120111
date_dist(PG_FUNCTION_ARGS)
121112
{

‎contrib/btree_gist/btree_float4.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_float4_distance);
2323
PG_FUNCTION_INFO_V1(gbt_float4_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_float4_same);
2525

26-
Datumgbt_float4_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_float4_union(PG_FUNCTION_ARGS);
28-
Datumgbt_float4_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_float4_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_float4_distance(PG_FUNCTION_ARGS);
31-
Datumgbt_float4_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_float4_same(PG_FUNCTION_ARGS);
33-
3426
staticbool
3527
gbt_float4gt(constvoid*a,constvoid*b)
3628
{
@@ -96,7 +88,6 @@ static const gbtree_ninfo tinfo =
9688

9789

9890
PG_FUNCTION_INFO_V1(float4_dist);
99-
Datumfloat4_dist(PG_FUNCTION_ARGS);
10091
Datum
10192
float4_dist(PG_FUNCTION_ARGS)
10293
{

‎contrib/btree_gist/btree_float8.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_float8_distance);
2323
PG_FUNCTION_INFO_V1(gbt_float8_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_float8_same);
2525

26-
Datumgbt_float8_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_float8_union(PG_FUNCTION_ARGS);
28-
Datumgbt_float8_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_float8_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_float8_distance(PG_FUNCTION_ARGS);
31-
Datumgbt_float8_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_float8_same(PG_FUNCTION_ARGS);
33-
3426

3527
staticbool
3628
gbt_float8gt(constvoid*a,constvoid*b)
@@ -104,7 +96,6 @@ static const gbtree_ninfo tinfo =
10496

10597

10698
PG_FUNCTION_INFO_V1(float8_dist);
107-
Datumfloat8_dist(PG_FUNCTION_ARGS);
10899
Datum
109100
float8_dist(PG_FUNCTION_ARGS)
110101
{

‎contrib/btree_gist/btree_gist.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ PG_FUNCTION_INFO_V1(gbt_decompress);
1111
PG_FUNCTION_INFO_V1(gbtreekey_in);
1212
PG_FUNCTION_INFO_V1(gbtreekey_out);
1313

14-
Datumgbt_decompress(PG_FUNCTION_ARGS);
15-
1614
/**************************************************
1715
* In/Out for keys
1816
**************************************************/

‎contrib/btree_gist/btree_inet.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_inet_consistent);
2525
PG_FUNCTION_INFO_V1(gbt_inet_penalty);
2626
PG_FUNCTION_INFO_V1(gbt_inet_same);
2727

28-
Datumgbt_inet_compress(PG_FUNCTION_ARGS);
29-
Datumgbt_inet_union(PG_FUNCTION_ARGS);
30-
Datumgbt_inet_picksplit(PG_FUNCTION_ARGS);
31-
Datumgbt_inet_consistent(PG_FUNCTION_ARGS);
32-
Datumgbt_inet_penalty(PG_FUNCTION_ARGS);
33-
Datumgbt_inet_same(PG_FUNCTION_ARGS);
34-
3528

3629
staticbool
3730
gbt_inetgt(constvoid*a,constvoid*b)

‎contrib/btree_gist/btree_int2.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int2_distance);
2323
PG_FUNCTION_INFO_V1(gbt_int2_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_int2_same);
2525

26-
Datumgbt_int2_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_int2_union(PG_FUNCTION_ARGS);
28-
Datumgbt_int2_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_int2_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_int2_distance(PG_FUNCTION_ARGS);
31-
Datumgbt_int2_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_int2_same(PG_FUNCTION_ARGS);
33-
3426
staticbool
3527
gbt_int2gt(constvoid*a,constvoid*b)
3628
{
@@ -96,7 +88,6 @@ static const gbtree_ninfo tinfo =
9688

9789

9890
PG_FUNCTION_INFO_V1(int2_dist);
99-
Datumint2_dist(PG_FUNCTION_ARGS);
10091
Datum
10192
int2_dist(PG_FUNCTION_ARGS)
10293
{

‎contrib/btree_gist/btree_int4.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int4_distance);
2323
PG_FUNCTION_INFO_V1(gbt_int4_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_int4_same);
2525

26-
Datumgbt_int4_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_int4_union(PG_FUNCTION_ARGS);
28-
Datumgbt_int4_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_int4_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_int4_distance(PG_FUNCTION_ARGS);
31-
Datumgbt_int4_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_int4_same(PG_FUNCTION_ARGS);
33-
3426

3527
staticbool
3628
gbt_int4gt(constvoid*a,constvoid*b)
@@ -97,7 +89,6 @@ static const gbtree_ninfo tinfo =
9789

9890

9991
PG_FUNCTION_INFO_V1(int4_dist);
100-
Datumint4_dist(PG_FUNCTION_ARGS);
10192
Datum
10293
int4_dist(PG_FUNCTION_ARGS)
10394
{

‎contrib/btree_gist/btree_int8.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int8_distance);
2323
PG_FUNCTION_INFO_V1(gbt_int8_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_int8_same);
2525

26-
Datumgbt_int8_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_int8_union(PG_FUNCTION_ARGS);
28-
Datumgbt_int8_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_int8_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_int8_distance(PG_FUNCTION_ARGS);
31-
Datumgbt_int8_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_int8_same(PG_FUNCTION_ARGS);
33-
3426

3527
staticbool
3628
gbt_int8gt(constvoid*a,constvoid*b)
@@ -97,7 +89,6 @@ static const gbtree_ninfo tinfo =
9789

9890

9991
PG_FUNCTION_INFO_V1(int8_dist);
100-
Datumint8_dist(PG_FUNCTION_ARGS);
10192
Datum
10293
int8_dist(PG_FUNCTION_ARGS)
10394
{

‎contrib/btree_gist/btree_interval.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ PG_FUNCTION_INFO_V1(gbt_intv_distance);
2626
PG_FUNCTION_INFO_V1(gbt_intv_penalty);
2727
PG_FUNCTION_INFO_V1(gbt_intv_same);
2828

29-
Datumgbt_intv_compress(PG_FUNCTION_ARGS);
30-
Datumgbt_intv_decompress(PG_FUNCTION_ARGS);
31-
Datumgbt_intv_union(PG_FUNCTION_ARGS);
32-
Datumgbt_intv_picksplit(PG_FUNCTION_ARGS);
33-
Datumgbt_intv_consistent(PG_FUNCTION_ARGS);
34-
Datumgbt_intv_distance(PG_FUNCTION_ARGS);
35-
Datumgbt_intv_penalty(PG_FUNCTION_ARGS);
36-
Datumgbt_intv_same(PG_FUNCTION_ARGS);
37-
3829

3930
staticbool
4031
gbt_intvgt(constvoid*a,constvoid*b)
@@ -129,7 +120,6 @@ abs_interval(Interval *a)
129120
}
130121

131122
PG_FUNCTION_INFO_V1(interval_dist);
132-
Datuminterval_dist(PG_FUNCTION_ARGS);
133123
Datum
134124
interval_dist(PG_FUNCTION_ARGS)
135125
{

‎contrib/btree_gist/btree_macaddr.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_macad_consistent);
2424
PG_FUNCTION_INFO_V1(gbt_macad_penalty);
2525
PG_FUNCTION_INFO_V1(gbt_macad_same);
2626

27-
Datumgbt_macad_compress(PG_FUNCTION_ARGS);
28-
Datumgbt_macad_union(PG_FUNCTION_ARGS);
29-
Datumgbt_macad_picksplit(PG_FUNCTION_ARGS);
30-
Datumgbt_macad_consistent(PG_FUNCTION_ARGS);
31-
Datumgbt_macad_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_macad_same(PG_FUNCTION_ARGS);
33-
3427

3528
staticbool
3629
gbt_macadgt(constvoid*a,constvoid*b)

‎contrib/btree_gist/btree_numeric.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_numeric_consistent);
2323
PG_FUNCTION_INFO_V1(gbt_numeric_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_numeric_same);
2525

26-
Datumgbt_numeric_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_numeric_union(PG_FUNCTION_ARGS);
28-
Datumgbt_numeric_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_numeric_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_numeric_penalty(PG_FUNCTION_ARGS);
31-
Datumgbt_numeric_same(PG_FUNCTION_ARGS);
32-
3326

3427
/* define for comparison */
3528

‎contrib/btree_gist/btree_oid.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_oid_distance);
2323
PG_FUNCTION_INFO_V1(gbt_oid_penalty);
2424
PG_FUNCTION_INFO_V1(gbt_oid_same);
2525

26-
Datumgbt_oid_compress(PG_FUNCTION_ARGS);
27-
Datumgbt_oid_union(PG_FUNCTION_ARGS);
28-
Datumgbt_oid_picksplit(PG_FUNCTION_ARGS);
29-
Datumgbt_oid_consistent(PG_FUNCTION_ARGS);
30-
Datumgbt_oid_distance(PG_FUNCTION_ARGS);
31-
Datumgbt_oid_penalty(PG_FUNCTION_ARGS);
32-
Datumgbt_oid_same(PG_FUNCTION_ARGS);
33-
3426

3527
staticbool
3628
gbt_oidgt(constvoid*a,constvoid*b)
@@ -103,7 +95,6 @@ static const gbtree_ninfo tinfo =
10395

10496

10597
PG_FUNCTION_INFO_V1(oid_dist);
106-
Datumoid_dist(PG_FUNCTION_ARGS);
10798
Datum
10899
oid_dist(PG_FUNCTION_ARGS)
109100
{

‎contrib/btree_gist/btree_text.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ PG_FUNCTION_INFO_V1(gbt_bpchar_consistent);
1919
PG_FUNCTION_INFO_V1(gbt_text_penalty);
2020
PG_FUNCTION_INFO_V1(gbt_text_same);
2121

22-
Datumgbt_text_compress(PG_FUNCTION_ARGS);
23-
Datumgbt_bpchar_compress(PG_FUNCTION_ARGS);
24-
Datumgbt_text_union(PG_FUNCTION_ARGS);
25-
Datumgbt_text_picksplit(PG_FUNCTION_ARGS);
26-
Datumgbt_text_consistent(PG_FUNCTION_ARGS);
27-
Datumgbt_bpchar_consistent(PG_FUNCTION_ARGS);
28-
Datumgbt_text_penalty(PG_FUNCTION_ARGS);
29-
Datumgbt_text_same(PG_FUNCTION_ARGS);
30-
3122

3223
/* define for comparison */
3324

‎contrib/btree_gist/btree_time.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ PG_FUNCTION_INFO_V1(gbt_timetz_consistent);
2727
PG_FUNCTION_INFO_V1(gbt_time_penalty);
2828
PG_FUNCTION_INFO_V1(gbt_time_same);
2929

30-
Datumgbt_time_compress(PG_FUNCTION_ARGS);
31-
Datumgbt_timetz_compress(PG_FUNCTION_ARGS);
32-
Datumgbt_time_union(PG_FUNCTION_ARGS);
33-
Datumgbt_time_picksplit(PG_FUNCTION_ARGS);
34-
Datumgbt_time_consistent(PG_FUNCTION_ARGS);
35-
Datumgbt_time_distance(PG_FUNCTION_ARGS);
36-
Datumgbt_timetz_consistent(PG_FUNCTION_ARGS);
37-
Datumgbt_time_penalty(PG_FUNCTION_ARGS);
38-
Datumgbt_time_same(PG_FUNCTION_ARGS);
39-
4030

4131
#ifdefUSE_FLOAT8_BYVAL
4232
#defineTimeADTGetDatumFast(X) TimeADTGetDatum(X)
@@ -145,7 +135,6 @@ static const gbtree_ninfo tinfo =
145135

146136

147137
PG_FUNCTION_INFO_V1(time_dist);
148-
Datumtime_dist(PG_FUNCTION_ARGS);
149138
Datum
150139
time_dist(PG_FUNCTION_ARGS)
151140
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp