From 95c5e4eef4e914db1d44a80ca56733b08fd59054 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 21 Sep 2024 22:24:01 +0200 Subject: [PATCH 4/5] Remove unused #include's from src/test/ .c files as determined by IWYU --- src/test/modules/delay_execution/delay_execution.c | 2 +- src/test/modules/dummy_index_am/dummy_index_am.c | 2 -- src/test/modules/ldap_password_func/ldap_password_func.c | 4 +--- src/test/modules/libpq_pipeline/libpq_pipeline.c | 2 -- src/test/modules/plsample/plsample.c | 2 +- src/test/modules/test_ddl_deparse/test_ddl_deparse.c | 1 - src/test/modules/test_integerset/test_integerset.c | 4 ---- src/test/modules/test_oat_hooks/test_oat_hooks.c | 1 - src/test/modules/test_radixtree/test_radixtree.c | 2 -- src/test/modules/test_regex/test_regex.c | 1 - src/test/modules/test_resowner/test_resowner_basic.c | 2 -- src/test/modules/test_resowner/test_resowner_many.c | 1 - src/test/modules/test_rls_hooks/test_rls_hooks.c | 1 - src/test/modules/test_shm_mq/setup.c | 1 - src/test/modules/test_slru/test_multixact.c | 2 +- src/test/modules/test_tidstore/test_tidstore.c | 1 - src/test/modules/worker_spi/worker_spi.c | 4 ---- src/test/regress/pg_regress.c | 1 - src/test/regress/regress.c | 3 --- 19 files changed, 4 insertions(+), 33 deletions(-) diff --git a/src/test/modules/delay_execution/delay_execution.c b/src/test/modules/delay_execution/delay_execution.c index 155c8a8d556..fa4693a3f57 100644 --- a/src/test/modules/delay_execution/delay_execution.c +++ b/src/test/modules/delay_execution/delay_execution.c @@ -23,7 +23,7 @@ #include #include "optimizer/planner.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/guc.h" #include "utils/inval.h" diff --git a/src/test/modules/dummy_index_am/dummy_index_am.c b/src/test/modules/dummy_index_am/dummy_index_am.c index 2841cf2eb4b..beb2c1d2542 100644 --- a/src/test/modules/dummy_index_am/dummy_index_am.c +++ b/src/test/modules/dummy_index_am/dummy_index_am.c @@ -18,8 +18,6 @@ #include "catalog/index.h" #include "commands/vacuum.h" #include "nodes/pathnodes.h" -#include "utils/guc.h" -#include "utils/rel.h" PG_MODULE_MAGIC; diff --git a/src/test/modules/ldap_password_func/ldap_password_func.c b/src/test/modules/ldap_password_func/ldap_password_func.c index 24d9c637818..84057d955aa 100644 --- a/src/test/modules/ldap_password_func/ldap_password_func.c +++ b/src/test/modules/ldap_password_func/ldap_password_func.c @@ -15,10 +15,8 @@ #include #include +#include "fmgr.h" #include "libpq/auth.h" -#include "libpq/libpq.h" -#include "libpq/libpq-be.h" -#include "utils/guc.h" PG_MODULE_MAGIC; diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c index 999a7f57a7e..1323e4c598d 100644 --- a/src/test/modules/libpq_pipeline/libpq_pipeline.c +++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c @@ -19,10 +19,8 @@ #include #include "catalog/pg_type_d.h" -#include "common/fe_memutils.h" #include "libpq-fe.h" #include "pg_getopt.h" -#include "portability/instr_time.h" static void exit_nicely(PGconn *conn); diff --git a/src/test/modules/plsample/plsample.c b/src/test/modules/plsample/plsample.c index 89ea166a676..25f7814f1f7 100644 --- a/src/test/modules/plsample/plsample.c +++ b/src/test/modules/plsample/plsample.c @@ -21,7 +21,7 @@ #include "commands/trigger.h" #include "executor/spi.h" #include "funcapi.h" -#include "utils/builtins.h" +#include "utils/fmgrprotos.h" #include "utils/lsyscache.h" #include "utils/syscache.h" diff --git a/src/test/modules/test_ddl_deparse/test_ddl_deparse.c b/src/test/modules/test_ddl_deparse/test_ddl_deparse.c index 2758ae82d7b..97cf52d133c 100644 --- a/src/test/modules/test_ddl_deparse/test_ddl_deparse.c +++ b/src/test/modules/test_ddl_deparse/test_ddl_deparse.c @@ -10,7 +10,6 @@ */ #include "postgres.h" -#include "catalog/pg_type.h" #include "funcapi.h" #include "nodes/execnodes.h" #include "tcop/deparse_utility.h" diff --git a/src/test/modules/test_integerset/test_integerset.c b/src/test/modules/test_integerset/test_integerset.c index 61f8d0b663a..73a97b81167 100644 --- a/src/test/modules/test_integerset/test_integerset.c +++ b/src/test/modules/test_integerset/test_integerset.c @@ -15,10 +15,6 @@ #include "common/pg_prng.h" #include "fmgr.h" #include "lib/integerset.h" -#include "miscadmin.h" -#include "nodes/bitmapset.h" -#include "storage/block.h" -#include "storage/itemptr.h" #include "utils/memutils.h" #include "utils/timestamp.h" diff --git a/src/test/modules/test_oat_hooks/test_oat_hooks.c b/src/test/modules/test_oat_hooks/test_oat_hooks.c index 05c33712254..ca4aa7e6696 100644 --- a/src/test/modules/test_oat_hooks/test_oat_hooks.c +++ b/src/test/modules/test_oat_hooks/test_oat_hooks.c @@ -16,7 +16,6 @@ #include "access/parallel.h" #include "catalog/dependency.h" #include "catalog/objectaccess.h" -#include "catalog/pg_proc.h" #include "executor/executor.h" #include "fmgr.h" #include "miscadmin.h" diff --git a/src/test/modules/test_radixtree/test_radixtree.c b/src/test/modules/test_radixtree/test_radixtree.c index 1d9165a3a23..3e072fa5ec6 100644 --- a/src/test/modules/test_radixtree/test_radixtree.c +++ b/src/test/modules/test_radixtree/test_radixtree.c @@ -15,8 +15,6 @@ #include "common/int.h" #include "common/pg_prng.h" #include "fmgr.h" -#include "miscadmin.h" -#include "storage/lwlock.h" #include "utils/memutils.h" #include "utils/timestamp.h" diff --git a/src/test/modules/test_regex/test_regex.c b/src/test/modules/test_regex/test_regex.c index c4ef15d7425..cd503a2cd81 100644 --- a/src/test/modules/test_regex/test_regex.c +++ b/src/test/modules/test_regex/test_regex.c @@ -15,7 +15,6 @@ #include "postgres.h" #include "funcapi.h" -#include "miscadmin.h" #include "regex/regex.h" #include "utils/array.h" #include "utils/builtins.h" diff --git a/src/test/modules/test_resowner/test_resowner_basic.c b/src/test/modules/test_resowner/test_resowner_basic.c index 558cf1de56e..1d9c1cd0259 100644 --- a/src/test/modules/test_resowner/test_resowner_basic.c +++ b/src/test/modules/test_resowner/test_resowner_basic.c @@ -13,8 +13,6 @@ #include "postgres.h" #include "fmgr.h" -#include "lib/ilist.h" -#include "utils/memutils.h" #include "utils/resowner.h" PG_MODULE_MAGIC; diff --git a/src/test/modules/test_resowner/test_resowner_many.c b/src/test/modules/test_resowner/test_resowner_many.c index 7808c9e5df3..4f3f5ebf87e 100644 --- a/src/test/modules/test_resowner/test_resowner_many.c +++ b/src/test/modules/test_resowner/test_resowner_many.c @@ -14,7 +14,6 @@ #include "fmgr.h" #include "lib/ilist.h" -#include "utils/memutils.h" #include "utils/resowner.h" /* diff --git a/src/test/modules/test_rls_hooks/test_rls_hooks.c b/src/test/modules/test_rls_hooks/test_rls_hooks.c index 358e28edb45..d18d5815cfe 100644 --- a/src/test/modules/test_rls_hooks/test_rls_hooks.c +++ b/src/test/modules/test_rls_hooks/test_rls_hooks.c @@ -15,7 +15,6 @@ #include "catalog/pg_type.h" #include "fmgr.h" -#include "miscadmin.h" #include "nodes/makefuncs.h" #include "parser/parse_clause.h" #include "parser/parse_collate.h" diff --git a/src/test/modules/test_shm_mq/setup.c b/src/test/modules/test_shm_mq/setup.c index b3dac44d97a..fb235604394 100644 --- a/src/test/modules/test_shm_mq/setup.c +++ b/src/test/modules/test_shm_mq/setup.c @@ -18,7 +18,6 @@ #include "miscadmin.h" #include "pgstat.h" #include "postmaster/bgworker.h" -#include "storage/procsignal.h" #include "storage/shm_toc.h" #include "test_shm_mq.h" #include "utils/memutils.h" diff --git a/src/test/modules/test_slru/test_multixact.c b/src/test/modules/test_slru/test_multixact.c index 22cc441a385..1cc89aa116c 100644 --- a/src/test/modules/test_slru/test_multixact.c +++ b/src/test/modules/test_slru/test_multixact.c @@ -16,7 +16,7 @@ #include "access/multixact.h" #include "access/xact.h" -#include "utils/builtins.h" +#include "fmgr.h" #include "utils/injection_point.h" PG_FUNCTION_INFO_V1(test_create_multixact); diff --git a/src/test/modules/test_tidstore/test_tidstore.c b/src/test/modules/test_tidstore/test_tidstore.c index 94ddcf1de82..6da1cb24527 100644 --- a/src/test/modules/test_tidstore/test_tidstore.c +++ b/src/test/modules/test_tidstore/test_tidstore.c @@ -18,7 +18,6 @@ #include "access/tidstore.h" #include "fmgr.h" -#include "funcapi.h" #include "storage/block.h" #include "storage/itemptr.h" #include "storage/lwlock.h" diff --git a/src/test/modules/worker_spi/worker_spi.c b/src/test/modules/worker_spi/worker_spi.c index de8f46902b4..d4403b24d98 100644 --- a/src/test/modules/worker_spi/worker_spi.c +++ b/src/test/modules/worker_spi/worker_spi.c @@ -26,11 +26,7 @@ #include "miscadmin.h" #include "postmaster/bgworker.h" #include "postmaster/interrupt.h" -#include "storage/ipc.h" #include "storage/latch.h" -#include "storage/lwlock.h" -#include "storage/proc.h" -#include "storage/shmem.h" /* these headers are used by this particular worker's code */ #include "access/xact.h" diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 6c188954b14..0e40ed32a21 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -28,7 +28,6 @@ #include "common/logging.h" #include "common/restricted_token.h" -#include "common/string.h" #include "common/username.h" #include "getopt_long.h" #include "lib/stringinfo.h" diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index 9e81371be4b..8bae56a9777 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -21,8 +21,6 @@ #include "access/detoast.h" #include "access/htup_details.h" -#include "access/transam.h" -#include "access/xact.h" #include "catalog/namespace.h" #include "catalog/pg_operator.h" #include "catalog/pg_type.h" @@ -39,7 +37,6 @@ #include "parser/parse_coerce.h" #include "port/atomics.h" #include "storage/spin.h" -#include "utils/array.h" #include "utils/builtins.h" #include "utils/geo_decls.h" #include "utils/memutils.h" -- 2.47.0