{"thread":{"id":"62234","subject":"[PATCH] Fix unused-parameter warnings with NO_ICONV","startedAt":"2024-10-02T09:24:01Z","lastAt":"2024-10-03T21:02:43Z","messageCount":6,"participants":["Mike Hommey","Kristoffer Haugsbakk","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"503894","messageId":"20241002090606.2076645-1-mh@glandium.org","threadId":"62234","inReplyTo":null,"subject":"[PATCH] Fix unused-parameter warnings with NO_ICONV","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2024-10-02T09:06:06Z","receivedAt":"2024-10-02T09:24:01Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"The jk/unused-parameters topic enabled -Wunused-parameter. Some code in\nsome non-typical configuration lacked annotations.\n---\n utf8.h | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/utf8.h b/utf8.h\nindex fcd5167baf..cce299d274 100644\n--- a/utf8.h\n+++ b/utf8.h\n@@ -33,8 +33,9 @@ char *reencode_string_len(const char *in, size_t insz,\n \t\t\t  const char *in_encoding,\n \t\t\t  size_t *outsz);\n #else\n-static inline char *reencode_string_len(const char *a, size_t b,\n-\t\t\t\t\tconst char *c, const char *d, size_t *e)\n+static inline char *reencode_string_len(const char *a UNUSED, size_t b UNUSED,\n+\t\t\t\t\tconst char *c UNUSED,\n+\t\t\t\t\tconst char *d UNUSED, size_t *e)\n { if (e) *e = 0; return NULL; }\n #endif\n \n-- \n2.46.1.1.gad55fb22ef\n\n"},{"id":"503896","messageId":"cec3d068-38d3-4802-b2d0-77644dd425c3@app.fastmail.com","threadId":"62234","inReplyTo":"20241002090606.2076645-1-mh@glandium.org","subject":"Re: [PATCH] Fix unused-parameter warnings with NO_ICONV","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-10-02T09:47:00Z","receivedAt":"2024-10-02T09:47:43Z","isPatch":true,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Oct 2, 2024, at 11:06, Mike Hommey wrote:\n> The jk/unused-parameters topic enabled -Wunused-parameter. Some code in\n> some non-typical configuration lacked annotations.\n\nYou forgot the sign-off.\n\n-- \nKristoffer Haugsbakk\n"},{"id":"503974","messageId":"20241002200140.2123584-1-mh@glandium.org","threadId":"62234","inReplyTo":"cec3d068-38d3-4802-b2d0-77644dd425c3@app.fastmail.com","subject":"[PATCH] Fix unused-parameter warnings with NO_ICONV","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2024-10-02T20:01:40Z","receivedAt":"2024-10-02T20:02:01Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"The jk/unused-parameters topic enabled -Wunused-parameter. Some code in\nsome non-typical configuration lacked annotations.\n\nSigned-off-by: Mike Hommey <mh@glandium.org>\n---\n utf8.h | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/utf8.h b/utf8.h\nindex fcd5167baf..cce299d274 100644\n--- a/utf8.h\n+++ b/utf8.h\n@@ -33,8 +33,9 @@ char *reencode_string_len(const char *in, size_t insz,\n \t\t\t  const char *in_encoding,\n \t\t\t  size_t *outsz);\n #else\n-static inline char *reencode_string_len(const char *a, size_t b,\n-\t\t\t\t\tconst char *c, const char *d, size_t *e)\n+static inline char *reencode_string_len(const char *a UNUSED, size_t b UNUSED,\n+\t\t\t\t\tconst char *c UNUSED,\n+\t\t\t\t\tconst char *d UNUSED, size_t *e)\n { if (e) *e = 0; return NULL; }\n #endif\n \n-- \n2.46.1.1.gad55fb22ef\n\n"},{"id":"503980","messageId":"20241002220118.GA2892418@coredump.intra.peff.net","threadId":"62234","inReplyTo":"20241002200140.2123584-1-mh@glandium.org","subject":"Re: [PATCH] Fix unused-parameter warnings with NO_ICONV","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-10-02T22:01:18Z","receivedAt":"2024-10-02T22:01:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Oct 03, 2024 at 05:01:40AM +0900, Mike Hommey wrote:\n\n> The jk/unused-parameters topic enabled -Wunused-parameter. Some code in\n> some non-typical configuration lacked annotations.\n\nThanks, this looks good. I tried to catch compile-time variants like\nthis, but I was mostly limited to what we build in CI.\n\nOut of curiosity, what platform do you use that needs NO_ICONV (or is it\njust a preference)?\n\n-Peff\n"},{"id":"503995","messageId":"xmqq4j5uku3l.fsf@gitster.g","threadId":"62234","inReplyTo":"20241002200140.2123584-1-mh@glandium.org","subject":"Re: [PATCH] Fix unused-parameter warnings with NO_ICONV","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-10-02T22:39:26Z","receivedAt":"2024-10-02T22:39:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Hommey <mh@glandium.org> writes:\n\n> The jk/unused-parameters topic enabled -Wunused-parameter. Some code in\n> some non-typical configuration lacked annotations.\n>\n> Signed-off-by: Mike Hommey <mh@glandium.org>\n> ---\n>  utf8.h | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n\nThanks.\n\n> diff --git a/utf8.h b/utf8.h\n> index fcd5167baf..cce299d274 100644\n> --- a/utf8.h\n> +++ b/utf8.h\n> @@ -33,8 +33,9 @@ char *reencode_string_len(const char *in, size_t insz,\n>  \t\t\t  const char *in_encoding,\n>  \t\t\t  size_t *outsz);\n>  #else\n> -static inline char *reencode_string_len(const char *a, size_t b,\n> -\t\t\t\t\tconst char *c, const char *d, size_t *e)\n> +static inline char *reencode_string_len(const char *a UNUSED, size_t b UNUSED,\n> +\t\t\t\t\tconst char *c UNUSED,\n> +\t\t\t\t\tconst char *d UNUSED, size_t *e)\n>  { if (e) *e = 0; return NULL; }\n>  #endif\n"},{"id":"504045","messageId":"20241003210229.g4yzbs2xh276xmdk@glandium.org","threadId":"62234","inReplyTo":"20241002220118.GA2892418@coredump.intra.peff.net","subject":"Re: [PATCH] Fix unused-parameter warnings with NO_ICONV","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2024-10-03T21:02:29Z","receivedAt":"2024-10-03T21:02:43Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Wed, Oct 02, 2024 at 06:01:18PM -0400, Jeff King wrote:\n> On Thu, Oct 03, 2024 at 05:01:40AM +0900, Mike Hommey wrote:\n> \n> > The jk/unused-parameters topic enabled -Wunused-parameter. Some code in\n> > some non-typical configuration lacked annotations.\n> \n> Thanks, this looks good. I tried to catch compile-time variants like\n> this, but I was mostly limited to what we build in CI.\n> \n> Out of curiosity, what platform do you use that needs NO_ICONV (or is it\n> just a preference)?\n\nI'm just using parts of libgit.a and don't need the iconv support so I\ndisable it. That avoids a dependency on the iconv dll on Windows.\n\nMike\n"}]}