From: Yuriy Kolerov <ykolerov(a)synopsys.com>
iconv_close() accepts iconv_t type (which is void *) and passes
it to free() which accepts void *. However, GCC 14 raises a
-Wint-conversion warning if it is not casted to void * because
GCC cannot unwind typedef of iconv_t.
Signed-off-by: Yuriy Kolerov <ykolerov(a)synopsys.com>
---
libc/misc/wchar/wchar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
index 2714d47d7..782b67f93 100644
--- a/libc/misc/wchar/wchar.c
+++ b/libc/misc/wchar/wchar.c
@@ -1298,7 +1298,7 @@ iconv_t weak_function iconv_open(const char *tocode, const char
*fromcode)
int weak_function iconv_close(iconv_t cd)
{
- free(cd);
+ free((void *) cd);
return 0;
}
--
2.39.2