git: bb59375ae0ea - main - japanese/kakasi: fix build with clang 15
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 Jan 2023 19:05:23 UTC
The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=bb59375ae0ea035a780aabd0259f352c09b23ed9 commit bb59375ae0ea035a780aabd0259f352c09b23ed9 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-01-07 15:53:53 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-01-16 19:04:47 +0000 japanese/kakasi: fix build with clang 15 During an exp-run for llvm 15 (see bug 265425), it turned out that japanese/kakasi failed to build with clang 15: kanjiio.c:1083:11: error: incompatible integer to pointer conversion assigning to 'iconv_t' (aka 'struct __tag_iconv_t *') from 'int' [-Wint-conversion] fromutf8 = -1; ^ ~~ kanjiio.c:1087:9: error: incompatible integer to pointer conversion assigning to 'iconv_t' (aka 'struct __tag_iconv_t *') from 'int' [-Wint-conversion] toutf8 = -1; ^ ~~ This is because 'fromutf8' and 'toutf8' are of pointer type, not int. Add a cast to silence the warning. PR: 268815 Approved by: portmgr (tcberner) MFH: 2023Q1 --- japanese/kakasi/files/patch-src_kanjiio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/japanese/kakasi/files/patch-src_kanjiio.c b/japanese/kakasi/files/patch-src_kanjiio.c new file mode 100644 index 000000000000..ad81fa336fc8 --- /dev/null +++ b/japanese/kakasi/files/patch-src_kanjiio.c @@ -0,0 +1,16 @@ +--- src/kanjiio.c.orig 2013-02-07 07:26:18 UTC ++++ src/kanjiio.c +@@ -1080,11 +1080,11 @@ close_iconv() + { + if (fromutf8 != -1) { + iconv_close(fromutf8); +- fromutf8 = -1; ++ fromutf8 = (iconv_t) -1; + } + if (toutf8 != -1) { + iconv_close(toutf8); +- toutf8 = -1; ++ toutf8 = (iconv_t) -1; + } + } + #endif /* KAKASI_SUPPORT_UTF8 */