From: Ben Boeckel Date: Sat, 31 Jul 2021 02:42:20 GMT Subject: [PATCH v1 5/6] refs/debug: declare file-local variable to be static Message-ID: <20210731024221.2113906-6-mathstuf@gmail.com> In-Reply-To: <20210731024221.2113906-1-mathstuf@gmail.com> Declaring a variable in a source file as `extern` and then defining it later is not very useful. It can instead be declared as `static`. Signed-off-by: Ben Boeckel --- refs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/refs/debug.c b/refs/debug.c index 7db4abccc3..f5609408f3 100644 --- a/refs/debug.c +++ b/refs/debug.c @@ -9,7 +9,7 @@ struct debug_ref_store { struct ref_store *refs; }; -extern struct ref_storage_be refs_be_debug; +static struct ref_storage_be refs_be_debug; struct ref_store *maybe_debug_wrap_ref_store(const char *gitdir, struct ref_store *store) { @@ -413,7 +413,7 @@ static int debug_reflog_expire(struct ref_store *ref_store, const char *refname, return res; } -struct ref_storage_be refs_be_debug = { +static struct ref_storage_be refs_be_debug = { NULL, "debug", NULL, -- 2.31.1