Bug 271827 - www/webkit2-gtk3: fix build with clang 16
Summary: www/webkit2-gtk3: fix build with clang 16
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-06-04 21:16 UTC by Dimitry Andric
Modified: 2023-06-08 16:32 UTC (History)
0 users

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


Attachments
www/webkit2-gtk3: fix build with clang 16 (2.00 KB, patch)
2023-06-04 21:16 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-06-04 21:16:18 UTC
Clang 16 has a new error about integer values being outside the valid
range for enum types, which shows up when building www/webkit2-gtk3:

  /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.6/Source/WTF/wtf/URLHelpers.cpp:51:34: error: integer value 256 is outside the valid range of values [-256, 255] for this enumeration type [-Wenum-constexpr-conversion]
  constexpr auto scriptCodeLimit = static_cast<UScriptCode>(256);
                                   ^

Upstream fixed this in <https://commits.webkit.org/256560@main>, for
<https://bugs.webkit.org/show_bug.cgi?id=247770>, so apply that patch.
Thanks to Vladislav Shchapov for pointing out the upstream fix.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-06-04 21:16:36 UTC
Created attachment 242600 [details]
www/webkit2-gtk3: fix build with clang 16
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-06-08 16:31:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3b95146628d422f83a98cb438fedba67392c2eb1

commit 3b95146628d422f83a98cb438fedba67392c2eb1
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-04 21:10:56 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-08 16:29:48 +0000

    www/webkit2-gtk3: fix build with clang 16

    Clang 16 has a new error about integer values being outside the valid
    range for enum types, which shows up when building www/webkit2-gtk3:

      /wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.6/Source/WTF/wtf/URLHelpers.cpp:51:34: error: integer value 256 is outside the valid range of values [-256, 255] for this enumeration type [-Wenum-constexpr-conversion]
      constexpr auto scriptCodeLimit = static_cast<UScriptCode>(256);
                                       ^

    Upstream fixed this in <https://commits.webkit.org/256560@main>, for
    <https://bugs.webkit.org/show_bug.cgi?id=247770>, so apply that patch.
    Thanks to Vladislav Shchapov for pointing out the upstream fix.

    PR:             271827
    Approved by:    portmgr (build blanket)
    MFH:            2023Q2

 www/webkit2-gtk3/Makefile | 5 ++++-
 www/webkit2-gtk3/distinfo | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)