Bug 268815 - japanese/kakasi: fix build with clang 15
Summary: japanese/kakasi: fix build with clang 15
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2023-01-07 15:56 UTC by Dimitry Andric
Modified: 2023-01-16 19:07 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ota)


Attachments
japanese/kakasi: fix build with clang 15 (1.41 KB, patch)
2023-01-07 15:56 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-01-07 15:56:20 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-01-07 15:56:42 UTC
Created attachment 239333 [details]
japanese/kakasi: fix build with clang 15
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-01-07 16:39:01 UTC
^Triage: reporter is committer, assign accordingly.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-01-16 19:06:18 UTC
A commit in branch main references this bug:

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 (new) | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)