From e7128e8dbb305059c30ec085461297e619bcbff4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 18 Apr 2014 00:03:19 -0400 Subject: 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. --- contrib/btree_gist/btree_gist.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'contrib/btree_gist/btree_gist.c') diff --git a/contrib/btree_gist/btree_gist.c b/contrib/btree_gist/btree_gist.c index f2d2ed2cb28..e1dc253c96e 100644 --- a/contrib/btree_gist/btree_gist.c +++ b/contrib/btree_gist/btree_gist.c @@ -11,8 +11,6 @@ PG_FUNCTION_INFO_V1(gbt_decompress); PG_FUNCTION_INFO_V1(gbtreekey_in); PG_FUNCTION_INFO_V1(gbtreekey_out); -Datum gbt_decompress(PG_FUNCTION_ARGS); - /************************************************** * In/Out for keys **************************************************/ -- cgit v1.2.3