]> granicus.if.org Git - postgresql/commit
Create function prototype as part of PG_FUNCTION_INFO_V1 macro
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 18 Apr 2014 04:03:19 +0000 (00:03 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 18 Apr 2014 04:03:19 +0000 (00:03 -0400)
commite7128e8dbb305059c30ec085461297e619bcbff4
treeed4bf968847b30a098d113bb787adc2b97c687e0
parent01563158235f5650743fd9b1dfa80c3d8faf89bb
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.
88 files changed:
contrib/adminpack/adminpack.c
contrib/btree_gin/btree_gin.c
contrib/btree_gist/btree_bit.c
contrib/btree_gist/btree_bytea.c
contrib/btree_gist/btree_cash.c
contrib/btree_gist/btree_date.c
contrib/btree_gist/btree_float4.c
contrib/btree_gist/btree_float8.c
contrib/btree_gist/btree_gist.c
contrib/btree_gist/btree_inet.c
contrib/btree_gist/btree_int2.c
contrib/btree_gist/btree_int4.c
contrib/btree_gist/btree_int8.c
contrib/btree_gist/btree_interval.c
contrib/btree_gist/btree_macaddr.c
contrib/btree_gist/btree_numeric.c
contrib/btree_gist/btree_oid.c
contrib/btree_gist/btree_text.c
contrib/btree_gist/btree_time.c
contrib/btree_gist/btree_ts.c
contrib/btree_gist/btree_utils_var.c
contrib/chkpass/chkpass.c
contrib/citext/citext.c
contrib/cube/cube.c
contrib/dict_int/dict_int.c
contrib/dict_xsyn/dict_xsyn.c
contrib/earthdistance/earthdistance.c
contrib/file_fdw/file_fdw.c
contrib/fuzzystrmatch/dmetaphone.c
contrib/fuzzystrmatch/fuzzystrmatch.c
contrib/hstore/hstore.h
contrib/hstore/hstore_compat.c
contrib/hstore/hstore_gin.c
contrib/hstore/hstore_gist.c
contrib/hstore/hstore_io.c
contrib/hstore/hstore_op.c
contrib/intarray/_int_bool.c
contrib/intarray/_int_gin.c
contrib/intarray/_int_gist.c
contrib/intarray/_int_op.c
contrib/intarray/_intbig_gist.c
contrib/lo/lo.c
contrib/ltree/_ltree_gist.c
contrib/ltree/_ltree_op.c
contrib/ltree/ltree_gist.c
contrib/ltree/ltree_io.c
contrib/ltree/ltree_op.c
contrib/ltree/ltxtquery_io.c
contrib/pageinspect/btreefuncs.c
contrib/pageinspect/fsmfuncs.c
contrib/pageinspect/heapfuncs.c
contrib/pageinspect/rawpage.c
contrib/pg_buffercache/pg_buffercache_pages.c
contrib/pg_freespacemap/pg_freespacemap.c
contrib/pg_prewarm/pg_prewarm.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/pg_trgm/trgm_gin.c
contrib/pg_trgm/trgm_gist.c
contrib/pg_trgm/trgm_op.c
contrib/pg_upgrade_support/pg_upgrade_support.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgrowlocks/pgrowlocks.c
contrib/pgstattuple/pgstatindex.c
contrib/pgstattuple/pgstattuple.c
contrib/postgres_fdw/option.c
contrib/postgres_fdw/postgres_fdw.c
contrib/seg/seg.c
contrib/spi/autoinc.c
contrib/spi/insert_username.c
contrib/spi/moddatetime.c
contrib/spi/refint.c
contrib/spi/timetravel.c
contrib/sslinfo/sslinfo.c
contrib/tcn/tcn.c
contrib/test_parser/test_parser.c
contrib/test_shm_mq/test.c
contrib/tsearch2/tsearch2.c
contrib/unaccent/unaccent.c
contrib/uuid-ossp/uuid-ossp.c
contrib/worker_spi/worker_spi.c
contrib/xml2/xpath.c
contrib/xml2/xslt_proc.c
src/include/fmgr.h
src/pl/plperl/plperl.c
src/pl/plpgsql/src/plpgsql.h
src/pl/plpython/plpy_main.c
src/pl/tcl/pltcl.c
src/test/regress/regress.c