From: Martin Ågren Date: Wed, 19 Mar 2025 07:23:34 GMT Subject: [PATCH 1/8] pretty: tighten function signature to not take `void *` Message-ID: <192fc78dd869f28cb6ae91f3a26a05eb6b6a4bbf.1742367347.git.martin.agren@gmail.com> In-Reply-To: We take a `void *` and immediately cast it. Both callers already have this pointer as the right type, so tighten the interface and stop casting. Signed-off-by: Martin Ågren --- pretty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pretty.c b/pretty.c index 0bc8ad8a9a..a4e5fc5c50 100644 --- a/pretty.c +++ b/pretty.c @@ -1437,9 +1437,8 @@ static void free_decoration_options(const struct decoration_options *opts) static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ const char *placeholder, - void *context) + struct format_commit_context *c) { - struct format_commit_context *c = context; const struct commit *commit = c->commit; const char *msg = c->message; struct commit_list *p; -- 2.49.0.472.ge94155a9ec