List for cgit developers and users
 help / color / mirror / Atom feed
From: Kian Kasad <kian@kasad.com>
To: cgit@lists.zx2c4.com
Cc: dannftk@yandex.ru, Kian Kasad <kian@kasad.com>
Subject: [PATCH v2] Fix error caused by missing parameter name
Date: Sun,  4 Aug 2024 11:43:57 -0700	[thread overview]
Message-ID: <20240804184459.84613-3-kian@kasad.com> (raw)
In-Reply-To: <65a07ff0-48b8-43d9-914e-adfc217f0858@yandex.ru>

This fixes an error which was introduced by
2f50b47c72cbc4270bbd12ae7f520486d5f42736. Git added a new argument to
config_fn_t, and it was added to gitconfig_config(), but not named. This
causes compile warnings/errors. This commit fixes that by naming the new
parameter, and marking it unused.

---

The attribute used here is specific to GCC and Clang, but we're already
using non-standard features like the memrchr() function, so this seems
like it isn't a problem.

 scan-tree.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scan-tree.c b/scan-tree.c
index 84da86e..8858b74 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -54,7 +54,8 @@ static void scan_tree_repo_config(const char *name, const char *value)
 	config_fn(repo, name, value);
 }
 
-static int gitconfig_config(const char *key, const char *value, const struct config_context *, void *cb)
+static int gitconfig_config(const char *key, const char *value,
+		const __attribute__((unused)) struct config_context *ctx, void *cb)
 {
 	const char *name;
 
-- 
2.46.0


      reply	other threads:[~2024-08-04 18:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-03 21:52 Typo introduced #2f50b47 Alexander Pickering
2024-08-04  3:01 ` Kian Kasad
2024-08-04  3:18   ` [PATCH] Fix error caused by missing parameter name Kian Kasad
2024-08-04  6:17     ` Денис Пронин
2024-08-04 18:43       ` Kian Kasad [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240804184459.84613-3-kian@kasad.com \
    --to=kian@kasad.com \
    --cc=cgit@lists.zx2c4.com \
    --cc=dannftk@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).