8000 Remove unused #include's from bin .c files · postgrespro/postgres@ecb5af7 · GitHub
[go: up one dir, main page]

Skip to content

Commit ecb5af7

Browse files
committed
Remove unused #include's from bin .c files
as determined by IWYU Similar to commit dbbca2c, but for bin and some related files. Discussion: https://www.postgresql.org/message-id/flat/0df1d5b1-8ca8-4f84-93be-121081bde049%40eisentraut.org
1 parent ba08edb commit ecb5af7

39 files changed

+10
-57
lines changed

src/bin/pg_basebackup/pg_createsubscriber.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313

1414
#include "postgres_fe.h"
1515

16+
#include <sys/stat.h>
1617
#include <sys/time.h>
1718
#include <sys/wait.h>
1819
#include <time.h>
1920

20-
#include "catalog/pg_authid_d.h"
2121
#include "common/connect.h"
2222
#include "common/controldata_utils.h"
23-
#include "common/file_perm.h"
2423
#include "common/logging.h"
2524
#include "common/pg_prng.h"
2625
#include "common/restricted_token.h"

src/bin/pg_basebackup/pg_recvlogical.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <sys/stat.h>
1919
#include <unistd.h>
2020

21-
#include "access/xlog_internal.h"
22-
#include "common/fe_memutils.h"
2321
#include "common/file_perm.h"
2422
#include "common/logging.h"
2523
#include "fe_utils/option_utils.h"

src/bin/pg_basebackup/receivelog.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <unistd.h>
2020

2121
#include "access/xlog_internal.h"
22-
#include "common/file_utils.h"
2322
#include "common/logging.h"
2423
#include "libpq-fe.h"
2524
#include "receivelog.h"

src/bin/pg_basebackup/streamutil.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919

2020
#include "access/xlog_internal.h"
2121
#include "common/connect.h"
22-
#include "common/fe_memutils.h"
2322
#include "common/file_perm.h"
2423
#include "common/logging.h"
2524
#include "common/string.h"
2625
#include "datatype/timestamp.h"
2726
#include "port/pg_bswap.h"
2827
#include "pqexpbuffer.h"
29-
#include "receivelog.h"
3028
#include "streamutil.h"
3129

3230
#define ERRCODE_DUPLICATE_OBJECT "42710"

Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "postgres_fe.h"
1313

14+
#include <fcntl.h>
1415
#include <sys/stat.h>
1516
#include <time.h>
1617
#include <unistd.h>
@@ -26,8 +27,7 @@
2627
#include "common/file_utils.h"
2728
#include "common/logging.h"
2829
#include "pgtar.h"
29-
#include "receivelog.h"
30-
#include "streamutil.h"
30+
#include "walmethods.h"
3131

3232
/* Size of zlib buffer for .tar.gz */
3333
#define ZLIB_OUT_SIZE 4096
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <unistd.h>
2222

2323
#include "common/controldata_utils.h"
24-
#include "common/file_perm.h"
2524
#include "common/file_utils.h"
2625
#include "common/logging.h"
2726
#include "common/relpath.h"
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "c.h"
1515
#include "common/checksum_helper.h"
16-
#include "common/file_utils.h"
1716

1817
/*
1918
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
#endif
2626

2727
#include "backup_label.h"
28-
#include "common/blkreftable.h"
2928
#include "common/checksum_helper.h"
3029
#include "common/controldata_utils.h"
3130
#include "common/file_perm.h"
3231
#include "common/file_utils.h"
3332
#include "common/logging.h"
33+
#include "common/relpath.h"
3434
#include "copy_file.h"
3535
#include "fe_utils/option_utils.h"
3636
#include "getopt_long.h"
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "postgres_fe.h"
2626

2727
#include "common/config_info.h"
28-
#include "port.h"
2928

3029
static const char *progname;
3130

Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#include "catalog/pg_subscription_d.h"
2828
#include "catalog/pg_type_d.h"
2929
#include "common/hashfn.h"
30-
#include "fe_utils/string_utils.h"
31-
#include "pg_backup_archiver.h"
3230
#include "pg_backup_utils.h"
3331
#include "pg_dump.h"
3432