diff options
author | Peter Eisentraut | 2014-04-18 04:03:19 +0000 |
---|---|---|
committer | Peter Eisentraut | 2014-04-18 04:03:19 +0000 |
commit | e7128e8dbb305059c30ec085461297e619bcbff4 (patch) | |
tree | ed4bf968847b30a098d113bb787adc2b97c687e0 /contrib/cube/cube.c | |
parent | 01563158235f5650743fd9b1dfa80c3d8faf89bb (diff) |
Create function prototype as part of PG_FUNCTION_INFO_V1 macro
Because of gcc -Wmissing-prototypes, all functions in dynamically
loadable modules must have a separate prototype declaration. This is
meant 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 of
compiler warnings in extension modules.
We can fix that by creating the function prototype as part of the
PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway. That
makes the code of modules cleaner, because there is one less place where
the entry points have to be listed, and creates an additional check that
functions have the right prototype.
Remove now redundant prototypes from contrib and other modules.
Diffstat (limited to 'contrib/cube/cube.c')
-rw-r--r-- | contrib/cube/cube.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c index 9524943ca80..906cc9efc7f 100644 --- a/contrib/cube/cube.c +++ b/contrib/cube/cube.c @@ -47,19 +47,6 @@ PG_FUNCTION_INFO_V1(cube_ll_coord); PG_FUNCTION_INFO_V1(cube_ur_coord); PG_FUNCTION_INFO_V1(cube_subset); -Datum cube_in(PG_FUNCTION_ARGS); -Datum cube_a_f8_f8(PG_FUNCTION_ARGS); -Datum cube_a_f8(PG_FUNCTION_ARGS); -Datum cube_out(PG_FUNCTION_ARGS); -Datum cube_f8(PG_FUNCTION_ARGS); -Datum cube_f8_f8(PG_FUNCTION_ARGS); -Datum cube_c_f8(PG_FUNCTION_ARGS); -Datum cube_c_f8_f8(PG_FUNCTION_ARGS); -Datum cube_dim(PG_FUNCTION_ARGS); -Datum cube_ll_coord(PG_FUNCTION_ARGS); -Datum cube_ur_coord(PG_FUNCTION_ARGS); -Datum cube_subset(PG_FUNCTION_ARGS); - /* ** GiST support methods */ @@ -72,14 +59,6 @@ PG_FUNCTION_INFO_V1(g_cube_picksplit); PG_FUNCTION_INFO_V1(g_cube_union); PG_FUNCTION_INFO_V1(g_cube_same); -Datum g_cube_consistent(PG_FUNCTION_ARGS); -Datum g_cube_compress(PG_FUNCTION_ARGS); -Datum g_cube_decompress(PG_FUNCTION_ARGS); -Datum g_cube_penalty(PG_FUNCTION_ARGS); -Datum g_cube_picksplit(PG_FUNCTION_ARGS); -Datum g_cube_union(PG_FUNCTION_ARGS); -Datum g_cube_same(PG_FUNCTION_ARGS); - /* ** B-tree support functions */ @@ -91,14 +70,6 @@ PG_FUNCTION_INFO_V1(cube_le); PG_FUNCTION_INFO_V1(cube_ge); PG_FUNCTION_INFO_V1(cube_cmp); -Datum cube_eq(PG_FUNCTION_ARGS); -Datum cube_ne(PG_FUNCTION_ARGS); -Datum cube_lt(PG_FUNCTION_ARGS); -Datum cube_gt(PG_FUNCTION_ARGS); -Datum cube_le(PG_FUNCTION_ARGS); -Datum cube_ge(PG_FUNCTION_ARGS); -Datum cube_cmp(PG_FUNCTION_ARGS); - /* ** R-tree support functions */ @@ -110,13 +81,6 @@ PG_FUNCTION_INFO_V1(cube_union); PG_FUNCTION_INFO_V1(cube_inter); PG_FUNCTION_INFO_V1(cube_size); -Datum cube_contains(PG_FUNCTION_ARGS); -Datum cube_contained(PG_FUNCTION_ARGS); -Datum cube_overlap(PG_FUNCTION_ARGS); -Datum cube_union(PG_FUNCTION_ARGS); -Datum cube_inter(PG_FUNCTION_ARGS); -Datum cube_size(PG_FUNCTION_ARGS); - /* ** miscellaneous */ @@ -124,10 +88,6 @@ PG_FUNCTION_INFO_V1(cube_distance); PG_FUNCTION_INFO_V1(cube_is_point); PG_FUNCTION_INFO_V1(cube_enlarge); -Datum cube_distance(PG_FUNCTION_ARGS); -Datum cube_is_point(PG_FUNCTION_ARGS); -Datum cube_enlarge(PG_FUNCTION_ARGS); - /* ** For internal use only */ |