git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix unused-parameter warnings with NO_ICONV

From
Mike Hommey <mh@glandium.org>
Date
Oct 2, 2024, 20:01 UTC
Message-ID
<20241002200140.2123584-1-mh@glandium.org>
In-Reply-To
<cec3d068-38d3-4802-b2d0-77644dd425c3@app.fastmail.com>

The jk/unused-parameters topic enabled -Wunused-parameter. Some code in some non-typical configuration lacked annotations.

Signed-off-by: Mike Hommey <mh@glandium.org>
---
 utf8.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/utf8.h b/utf8.h
index fcd5167baf..cce299d274 100644
--- a/utf8.h
+++ b/utf8.h
@@ -33,8 +33,9 @@ char *reencode_string_len(const char *in, size_t insz,
 			  const char *in_encoding,
 			  size_t *outsz);
 #else
-static inline char *reencode_string_len(const char *a, size_t b,
-					const char *c, const char *d, size_t *e)
+static inline char *reencode_string_len(const char *a UNUSED, size_t b UNUSED,
+					const char *c UNUSED,
+					const char *d UNUSED, size_t *e)
 { if (e) *e = 0; return NULL; }
 #endif
 
-- 
2.46.1.1.gad55fb22ef
Previous: Kristoffer HaugsbakkNext: Jeff King
Message 3 of 6 in “Fix unused-parameter warnings with NO_ICONV”
  1. Fix unused-parameter warnings with NO_ICONVMike Hommey, Oct 2, 2024
  2. Kristoffer HaugsbakkOct 2, 2024
  3. Fix unused-parameter warnings with NO_ICONVMike Hommey, Oct 2, 2024
  4. Jeff KingOct 2, 2024
  5. Mike HommeyOct 3, 2024
  6. Junio C HamanoOct 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.