From eea0e59ffbed6e33d171ace5be13cde9faa41639 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 23 Dec 2023 17:14:50 +0000 Subject: treewide: remove unnecessary includes in source files Each of these were checked with gcc -E -I. ${SOURCE_FILE} | grep ${HEADER_FILE} to ensure that removing the direct inclusion of the header actually resulted in that header no longer being included at all (i.e. that no other header pulled it in transitively). ...except for a few cases where we verified that although the header was brought in transitively, nothing from it was directly used in that source file. These cases were: * builtin/credential-cache.c * builtin/pull.c * builtin/send-pack.c Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- reftable/dump.c | 2 -- reftable/generic.c | 1 - reftable/merged.c | 1 - reftable/merged_test.c | 1 - reftable/reader.c | 1 - reftable/readwrite_test.c | 1 - reftable/refname_test.c | 1 - reftable/stack_test.c | 1 - reftable/test_framework.c | 1 - reftable/tree_test.c | 2 -- 10 files changed, 12 deletions(-) (limited to 'reftable') diff --git a/reftable/dump.c b/reftable/dump.c index ce936b4e18..26e0393c7d 100644 --- a/reftable/dump.c +++ b/reftable/dump.c @@ -11,14 +11,12 @@ https://developers.google.com/open-source/licenses/bsd #include "reftable-blocksource.h" #include "reftable-error.h" -#include "reftable-merged.h" #include "reftable-record.h" #include "reftable-tests.h" #include "reftable-writer.h" #include "reftable-iterator.h" #include "reftable-reader.h" #include "reftable-stack.h" -#include "reftable-generic.h" #include #include diff --git a/reftable/generic.c b/reftable/generic.c index 57f8032db9..b9f1c7c18a 100644 --- a/reftable/generic.c +++ b/reftable/generic.c @@ -6,7 +6,6 @@ license that can be found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd */ -#include "basics.h" #include "constants.h" #include "record.h" #include "generic.h" diff --git a/reftable/merged.c b/reftable/merged.c index 5ded470c08..9191f3addd 100644 --- a/reftable/merged.c +++ b/reftable/merged.c @@ -11,7 +11,6 @@ https://developers.google.com/open-source/licenses/bsd #include "constants.h" #include "iter.h" #include "pq.h" -#include "reader.h" #include "record.h" #include "generic.h" #include "reftable-merged.h" diff --git a/reftable/merged_test.c b/reftable/merged_test.c index d08c16abef..0d6e0d4bf5 100644 --- a/reftable/merged_test.c +++ b/reftable/merged_test.c @@ -12,7 +12,6 @@ https://developers.google.com/open-source/licenses/bsd #include "basics.h" #include "blocksource.h" -#include "constants.h" #include "reader.h" #include "record.h" #include "test_framework.h" diff --git a/reftable/reader.c b/reftable/reader.c index b4db23ce18..8b7a27781c 100644 --- a/reftable/reader.c +++ b/reftable/reader.c @@ -16,7 +16,6 @@ https://developers.google.com/open-source/licenses/bsd #include "record.h" #include "reftable-error.h" #include "reftable-generic.h" -#include "tree.h" uint64_t block_source_size(struct reftable_block_source *source) { diff --git a/reftable/readwrite_test.c b/reftable/readwrite_test.c index 469ab79a5a..f0d468be39 100644 --- a/reftable/readwrite_test.c +++ b/reftable/readwrite_test.c @@ -11,7 +11,6 @@ https://developers.google.com/open-source/licenses/bsd #include "basics.h" #include "block.h" #include "blocksource.h" -#include "constants.h" #include "reader.h" #include "record.h" #include "test_framework.h" diff --git a/reftable/refname_test.c b/reftable/refname_test.c index 8645cd93bb..699e1aea41 100644 --- a/reftable/refname_test.c +++ b/reftable/refname_test.c @@ -9,7 +9,6 @@ https://developers.google.com/open-source/licenses/bsd #include "basics.h" #include "block.h" #include "blocksource.h" -#include "constants.h" #include "reader.h" #include "record.h" #include "refname.h" diff --git a/reftable/stack_test.c b/reftable/stack_test.c index d0b717510f..d1b2908fa3 100644 --- a/reftable/stack_test.c +++ b/reftable/stack_test.c @@ -13,7 +13,6 @@ https://developers.google.com/open-source/licenses/bsd #include "reftable-reader.h" #include "merged.h" #include "basics.h" -#include "constants.h" #include "record.h" #include "test_framework.h" #include "reftable-tests.h" diff --git a/reftable/test_framework.c b/reftable/test_framework.c index 84ac972cad..04044fc1a0 100644 --- a/reftable/test_framework.c +++ b/reftable/test_framework.c @@ -9,7 +9,6 @@ https://developers.google.com/open-source/licenses/bsd #include "system.h" #include "test_framework.h" -#include "basics.h" void set_test_hash(uint8_t *p, int i) { diff --git a/reftable/tree_test.c b/reftable/tree_test.c index ac3a045ad4..6961a657ad 100644 --- a/reftable/tree_test.c +++ b/reftable/tree_test.c @@ -9,8 +9,6 @@ https://developers.google.com/open-source/licenses/bsd #include "system.h" #include "tree.h" -#include "basics.h" -#include "record.h" #include "test_framework.h" #include "reftable-tests.h" -- cgit v1.2.3