From Jason at zx2c4.com Fri Aug 2 16:25:06 2024 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Fri, 2 Aug 2024 18:25:06 +0200 Subject: [PATCH 1/1] git: update to v2.46.0 In-Reply-To: <20240729225144.4a047800@leda.eworm.net> References: <20240729204400.17966-1-list@eworm.de> <20240729225144.4a047800@leda.eworm.net> Message-ID: On Mon, Jul 29, 2024 at 10:51?PM Christian Hesse wrote: > > Christian Hesse on Mon, 2024/07/29 22:44: > > From: Christian Hesse > > > > Update to git version v2.46.0, this requires changes for these > > upstream commits: > > As the mailing list seems non-functional... Sending an extra personal ping. > > I pushed this to ch/for-jason, any change to merge? Sorry, mailing list back up. Thanks for bringing this to my attention. And merged a bunch to master, but not all yet. I'm headed on a trip on Sunday and I'll be back at the end of August and will look at the others in more detail. Jason From alex at cogarr.net Sat Aug 3 21:52:06 2024 From: alex at cogarr.net (Alexander Pickering) Date: Sat, 3 Aug 2024 16:52:06 -0500 Subject: Typo introduced #2f50b47 Message-ID: Hi all, Thanks for cgit, it's great! I have cgit occasionally (re-)compiling on a Debian 11 system with gcc, today it errored in scan-tree.c on the master branch. My setup script is: git clone https://git.zx2c4.com/cgit cd cgit git submodule init git submodule update make make install I got the error ../scan-tree.c:57:65: error: parameter name omitted 57 | ic int gitconfig_config(const char *key, const char *value, const struct config_context *, void *cb) I think this line static int gitconfig_config(const char *key, const char *value, const struct config_context *, void *cb) should be static int gitconfig_config(const char *key, const char *value, void *cb) If I make this change, it compiles and seems to work as expected. Best, Alex -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: From kian at kasad.com Sun Aug 4 03:01:57 2024 From: kian at kasad.com (Kian Kasad) Date: Sat, 3 Aug 2024 20:01:57 -0700 Subject: Typo introduced #2f50b47 In-Reply-To: References: Message-ID: <1BAC615F-471C-42B2-AABF-32A8D0A4F758@kasad.com> > On Aug 3, 2024, at 14:52, Alexander Pickering wrote: > > ../scan-tree.c:57:65: error: parameter name omitted > 57 | ic int gitconfig_config(const char *key, const char *value, > const struct config_context *, void *cb) > > I think this line > > static int gitconfig_config(const char *key, const char *value, const struct config_context *, void *cb) > > should be > > static int gitconfig_config(const char *key, const char *value, void *cb) I agree that that?s a mistake, but I disagree with your suggested change. The gitconfig_config() function is passed as the first argument to the git_config_from_file() function which is defined in git/config.c. That function expects the first argument to be of type config_fn_t, which does have the context argument. This is why it was added to gitconfig_config(). Therefore, the proper solution is to just give that argument a name, as removing it completely could cause further errors: static int gitconfig_config(const char *key, const char *value, const struct config_context *UNUSED, void *cb) Git seems to use the name ?UNUSED? which is why I have followed suit here. -- Kian Kasad kian at kasad.com (925) 871-9823 From kian at kasad.com Sun Aug 4 03:18:36 2024 From: kian at kasad.com (Kian Kasad) Date: Sat, 3 Aug 2024 20:18:36 -0700 Subject: [PATCH] Fix error caused by missing parameter name In-Reply-To: <1BAC615F-471C-42B2-AABF-32A8D0A4F758@kasad.com> References: <1BAC615F-471C-42B2-AABF-32A8D0A4F758@kasad.com> Message-ID: <20240804031857.40601-1-kian@kasad.com> 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. --- scan-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scan-tree.c b/scan-tree.c index 84da86e..d4fecd8 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 struct config_context *UNUSED, void *cb) { const char *name; -- 2.46.0 From dannftk at yandex.ru Sun Aug 4 06:17:21 2024 From: dannftk at yandex.ru (=?UTF-8?B?0JTQtdC90LjRgSDQn9GA0L7QvdC40L0=?=) Date: Sun, 4 Aug 2024 09:17:21 +0300 Subject: [PATCH] Fix error caused by missing parameter name In-Reply-To: <20240804031857.40601-1-kian@kasad.com> References: <1BAC615F-471C-42B2-AABF-32A8D0A4F758@kasad.com> <20240804031857.40601-1-kian@kasad.com> Message-ID: <65a07ff0-48b8-43d9-914e-adfc217f0858@yandex.ru> Hi, Don't you like to use __attribute__((unused)) for marking a parameter when such a need comes up? 04.08.2024 06:18, Kian Kasad ?????: > 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. > --- > scan-tree.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scan-tree.c b/scan-tree.c > index 84da86e..d4fecd8 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 struct config_context *UNUSED, void *cb) > { > const char *name; > From kian at kasad.com Sun Aug 4 18:43:57 2024 From: kian at kasad.com (Kian Kasad) Date: Sun, 4 Aug 2024 11:43:57 -0700 Subject: [PATCH v2] Fix error caused by missing parameter name In-Reply-To: <65a07ff0-48b8-43d9-914e-adfc217f0858@yandex.ru> References: <65a07ff0-48b8-43d9-914e-adfc217f0858@yandex.ru> Message-ID: <20240804184459.84613-3-kian@kasad.com> 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