Bug 268812 - x11-toolkits/gtk-sharp20: fix build with clang 15
Summary: x11-toolkits/gtk-sharp20: 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: freebsd-mono (Nobody)
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2023-01-07 15:06 UTC by Dimitry Andric
Modified: 2023-01-16 19:07 UTC (History)
0 users

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


Attachments
x11-toolkits/gtk-sharp20: fix build with clang 15 (1.37 KB, patch)
2023-01-07 15:07 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:06:45 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that x11-toolkits/gtk-sharp20 failed to build with clang 15:

  windowmanager.c:113:12: error: incompatible integer to pointer conversion assigning to 'gpointer' (aka 'void *') from 'long' [-Wint-conversion]
                  list [i] = data [i];
                           ^ ~~~~~~~~

This is because gdk_property_get() always returns an array of longs, and these have to be cast to whatever the desired outcome type is.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-01-07 15:07:23 UTC
Created attachment 239329 [details]
x11-toolkits/gtk-sharp20: fix build with clang 15
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-01-16 19:06:19 UTC
A commit in branch main references this bug:

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

commit a68bb8c9a0929cbe02e99640479b728b4b916f31
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-01-07 14:55:25 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-01-16 19:04:47 +0000

    x11-toolkits/gtk-sharp20: fix build with clang 15

    During an exp-run for llvm 15 (see bug 265425), it turned out that
    x11-toolkits/gtk-sharp20 failed to build with clang 15:

      windowmanager.c:113:12: error: incompatible integer to pointer conversion assigning to 'gpointer' (aka 'void *') from 'long' [-Wint-conversion]
                      list [i] = data [i];
                               ^ ~~~~~~~~

    This is because gdk_property_get() always returns an array of longs, and
    these have to be cast to whatever the desired outcome type is.

    PR:             268812
    Approved by:    portmgr (tcberner)
    MFH:            2023Q1

 .../gtk-sharp20/files/patch-gdk_glue_windowmanager.c (new)    | 11 +++++++++++
 1 file changed, 11 insertions(+)