pgsql: Create function prototype as part of PG_FUNCTION_INFO_V1 macro - Mailing list pgsql-committers
From | Peter Eisentraut |
---|---|
Subject | pgsql: Create function prototype as part of PG_FUNCTION_INFO_V1 macro |
Date | |
Msg-id | E1Wb03n-0003LQ-2h@gemulon.postgresql.org Whole thread Raw |
List | pgsql-committers |
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. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/e7128e8dbb305059c30ec085461297e619bcbff4 Modified Files -------------- contrib/adminpack/adminpack.c | 5 --- contrib/btree_gin/btree_gin.c | 5 --- contrib/btree_gist/btree_bit.c | 8 ----- contrib/btree_gist/btree_bytea.c | 7 ---- contrib/btree_gist/btree_cash.c | 9 ----- contrib/btree_gist/btree_date.c | 9 ----- contrib/btree_gist/btree_float4.c | 9 ----- contrib/btree_gist/btree_float8.c | 9 ----- contrib/btree_gist/btree_gist.c | 2 -- contrib/btree_gist/btree_inet.c | 7 ---- contrib/btree_gist/btree_int2.c | 9 ----- contrib/btree_gist/btree_int4.c | 9 ----- contrib/btree_gist/btree_int8.c | 9 ----- contrib/btree_gist/btree_interval.c | 10 ------ contrib/btree_gist/btree_macaddr.c | 7 ---- contrib/btree_gist/btree_numeric.c | 7 ---- contrib/btree_gist/btree_oid.c | 9 ----- contrib/btree_gist/btree_text.c | 9 ----- contrib/btree_gist/btree_time.c | 11 ------- contrib/btree_gist/btree_ts.c | 13 -------- contrib/btree_gist/btree_utils_var.c | 1 - contrib/chkpass/chkpass.c | 12 ------- contrib/citext/citext.c | 10 ------ contrib/cube/cube.c | 40 ----------------------- contrib/dict_int/dict_int.c | 3 -- contrib/dict_xsyn/dict_xsyn.c | 3 -- contrib/earthdistance/earthdistance.c | 2 -- contrib/file_fdw/file_fdw.c | 3 -- contrib/fuzzystrmatch/dmetaphone.c | 3 -- contrib/fuzzystrmatch/fuzzystrmatch.c | 12 ------- contrib/hstore/hstore.h | 1 - contrib/hstore/hstore_compat.c | 1 - contrib/hstore/hstore_gin.c | 3 -- contrib/hstore/hstore_gist.c | 11 ------- contrib/hstore/hstore_io.c | 13 -------- contrib/hstore/hstore_op.c | 28 ---------------- contrib/intarray/_int_bool.c | 8 ----- contrib/intarray/_int_gin.c | 2 -- contrib/intarray/_int_gist.c | 8 ----- contrib/intarray/_int_op.c | 21 ------------ contrib/intarray/_intbig_gist.c | 12 ------- contrib/lo/lo.c | 4 --- contrib/ltree/_ltree_gist.c | 11 ------- contrib/ltree/_ltree_op.c | 8 ----- contrib/ltree/ltree_gist.c | 16 --------- contrib/ltree/ltree_io.c | 7 ---- contrib/ltree/ltree_op.c | 19 ----------- contrib/ltree/ltxtquery_io.c | 3 -- contrib/pageinspect/btreefuncs.c | 4 --- contrib/pageinspect/fsmfuncs.c | 2 -- contrib/pageinspect/heapfuncs.c | 2 -- contrib/pageinspect/rawpage.c | 4 --- contrib/pg_buffercache/pg_buffercache_pages.c | 2 -- contrib/pg_freespacemap/pg_freespacemap.c | 2 -- contrib/pg_prewarm/pg_prewarm.c | 2 -- contrib/pg_stat_statements/pg_stat_statements.c | 4 --- contrib/pg_trgm/trgm_gin.c | 7 ---- contrib/pg_trgm/trgm_gist.c | 19 ----------- contrib/pg_trgm/trgm_op.c | 11 ------- contrib/pg_upgrade_support/pg_upgrade_support.c | 13 -------- contrib/pgcrypto/pgp-pgsql.c | 17 ---------- contrib/pgrowlocks/pgrowlocks.c | 2 -- contrib/pgstattuple/pgstatindex.c | 6 ---- contrib/pgstattuple/pgstattuple.c | 3 -- contrib/postgres_fdw/option.c | 2 -- contrib/postgres_fdw/postgres_fdw.c | 2 -- contrib/seg/seg.c | 7 ---- contrib/spi/autoinc.c | 2 -- contrib/spi/insert_username.c | 2 -- contrib/spi/moddatetime.c | 2 -- contrib/spi/refint.c | 4 --- contrib/spi/timetravel.c | 3 -- contrib/sslinfo/sslinfo.c | 10 ------ contrib/tcn/tcn.c | 4 --- contrib/test_parser/test_parser.c | 12 +------ contrib/test_shm_mq/test.c | 2 -- contrib/tsearch2/tsearch2.c | 23 ++----------- contrib/unaccent/unaccent.c | 3 -- contrib/uuid-ossp/uuid-ossp.c | 13 -------- contrib/worker_spi/worker_spi.c | 1 - contrib/xml2/xpath.c | 11 ------- contrib/xml2/xslt_proc.c | 4 --- src/include/fmgr.h | 1 + src/pl/plperl/plperl.c | 6 ---- src/pl/plpgsql/src/plpgsql.h | 3 -- src/pl/plpython/plpy_main.c | 11 +------ src/pl/tcl/pltcl.c | 2 -- src/test/regress/regress.c | 13 -------- 88 files changed, 5 insertions(+), 666 deletions(-)
pgsql-committers by date: