Bug 268790 - graphics/gimp-app: fix build with clang 15
Summary: graphics/gimp-app: 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-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2023-01-06 20:00 UTC by Dimitry Andric
Modified: 2023-01-07 14:15 UTC (History)
1 user (show)

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


Attachments
graphics/gimp-app: fix build with clang 15 (1.40 KB, patch)
2023-01-06 20:01 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-06 20:00:53 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that graphics/gimp-app failed to build with clang 15:

  file-dicom.c:605:26: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'gint32' (aka 'int') [-Wint-conversion]
                    return NULL;
                           ^~~~

This is because the return statement is a function that should return an integer, not a pointer. Replace it with the error value -1, as used
elsewhere in the function.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-01-06 20:01:39 UTC
Created attachment 239312 [details]
graphics/gimp-app: fix build with clang 15
Comment 2 Dima Panov freebsd_committer freebsd_triage 2023-01-06 20:45:02 UTC
(In reply to Dimitry Andric from comment #1)
Push it!

Dima, foster father of GIMP :)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-01-07 14:13:16 UTC
A commit in branch main references this bug:

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

commit 1b057efd888664e99dbe2a2ae548f2d2278483b4
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-01-06 19:57:09 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-01-07 14:11:02 +0000

    graphics/gimp-app: fix build with clang 15

    During an exp-run for llvm 15 (see bug 265425), it turned out that
    graphics/gimp-app failed to build with clang 15:

      file-dicom.c:605:26: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'gint32' (aka 'int') [-Wint-conversion]
                        return NULL;
                               ^~~~

    This is because the return statement is a function that should return an
    integer, not a pointer. Replace it with the error value -1, as used
    elsewhere in the function.

    PR:             268790
    Approved by:    fluffy (maintainer)
    MFH:            2023Q1

 .../gimp-app/files/patch-plug-ins_common_file-dicom.c (new)   | 11 +++++++++++
 1 file changed, 11 insertions(+)