summaryrefslogtreecommitdiff
path: root/contrib/pageinspect
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2014-04-18 00:03:19 -0400
committerPeter Eisentraut <peter_e@gmx.net>2014-04-18 00:03:19 -0400
commite7128e8dbb305059c30ec085461297e619bcbff4 (patch)
treeed4bf968847b30a098d113bb787adc2b97c687e0 /contrib/pageinspect
parent01563158235f5650743fd9b1dfa80c3d8faf89bb (diff)
downloadpostgresql-e7128e8dbb305059c30ec085461297e619bcbff4.tar.gz
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/pageinspect')
-rw-r--r--contrib/pageinspect/btreefuncs.c4
-rw-r--r--contrib/pageinspect/fsmfuncs.c2
-rw-r--r--contrib/pageinspect/heapfuncs.c2
-rw-r--r--contrib/pageinspect/rawpage.c4
4 files changed, 0 insertions, 12 deletions
diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c
index e3f3c2818f..c1e83f301b 100644
--- a/contrib/pageinspect/btreefuncs.c
+++ b/contrib/pageinspect/btreefuncs.c
@@ -35,10 +35,6 @@
#include "utils/rel.h"
-extern Datum bt_metap(PG_FUNCTION_ARGS);
-extern Datum bt_page_items(PG_FUNCTION_ARGS);
-extern Datum bt_page_stats(PG_FUNCTION_ARGS);
-
PG_FUNCTION_INFO_V1(bt_metap);
PG_FUNCTION_INFO_V1(bt_page_items);
PG_FUNCTION_INFO_V1(bt_page_stats);
diff --git a/contrib/pageinspect/fsmfuncs.c b/contrib/pageinspect/fsmfuncs.c
index bdae0a58d9..8c1960445a 100644
--- a/contrib/pageinspect/fsmfuncs.c
+++ b/contrib/pageinspect/fsmfuncs.c
@@ -25,8 +25,6 @@
#include "storage/fsm_internals.h"
#include "utils/builtins.h"
-Datum fsm_page_contents(PG_FUNCTION_ARGS);
-
/*
* Dumps the contents of a FSM page.
*/
diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c
index 5e532556e1..dedc8feaeb 100644
--- a/contrib/pageinspect/heapfuncs.c
+++ b/contrib/pageinspect/heapfuncs.c
@@ -30,8 +30,6 @@
#include "utils/builtins.h"
#include "miscadmin.h"
-Datum heap_page_items(PG_FUNCTION_ARGS);
-
/*
* bits_to_text
diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c
index f1e0944c0e..66c88b17af 100644
--- a/contrib/pageinspect/rawpage.c
+++ b/contrib/pageinspect/rawpage.c
@@ -28,10 +28,6 @@
PG_MODULE_MAGIC;
-Datum get_raw_page(PG_FUNCTION_ARGS);
-Datum get_raw_page_fork(PG_FUNCTION_ARGS);
-Datum page_header(PG_FUNCTION_ARGS);
-
static bytea *get_raw_page_internal(text *relname, ForkNumber forknum,
BlockNumber blkno);