Bug 272209 - x11/xdm: error: incompatible function pointer types (LLVM16)
Summary: x11/xdm: error: incompatible function pointer types (LLVM16)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-06-25 17:37 UTC by O. Hartmann
Modified: 2023-06-28 17:44 UTC (History)
4 users (show)

See Also:
manu: maintainer-feedback+


Attachments
Fix xdm's idea of setgrent (1.27 KB, patch)
2023-06-25 18:32 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 O. Hartmann 2023-06-25 17:37:43 UTC
Host: FreeBSD 14.0-CURRENT #2 main-n263789-f190c36b5d45: Sun Jun 25 14:46:00 CEST 2023 amd64

Compiling x11/xdm fails with the following error:

[...]
greet.c:451:20: error: incompatible function pointer types assigning to 'void (*)(void)' from 'int (*)(void)' [-Wincompatible-function-pointer-types]
    __xdm_setgrent = dlfuncs->_setgrent;
                   ^ ~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-06-25 18:32:36 UTC
Created attachment 242994 [details]
Fix xdm's idea of setgrent
Comment 2 Marcin Cieślak 2023-06-25 18:33:43 UTC
Maybe we should try to add a configure test and upstream it...
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2023-06-25 18:36:37 UTC
(In reply to Marcin Cieślak from comment #2)
The patch I added can be upstreamed. No supported version of FreeBSD has the old setgrent prototype anymore.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-06-28 17:26:50 UTC
A commit in branch main references this bug:

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

commit ffa7085ab4121e92eb61c4e1f6a7138e7ea43d6a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-25 18:26:57 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-28 17:25:30 +0000

    x11/xdm: fix build with clang 16

    Clang 16 has a new error about incompatible function types, which shows
    up when x11/xdm:

      greet.c:451:20: error: incompatible function pointer types assigning to 'void (*)(void)' from 'int (*)(void)' [-Wincompatible-function-pointer-types]
          __xdm_setgrent = dlfuncs->_setgrent;
                         ^ ~~~~~~~~~~~~~~~~~~

    This is because it assumes setgrent(3) returns int, which it has not
    done since a very long time.

    Reported by:    O. Hartmann <ohartmann@walstatt.org>
    PR:             272209
    MFH:            2023Q2

 x11/xdm/Makefile                          |  1 +
 x11/xdm/files/patch-include_greet.h (new) | 11 +++++++++++
 2 files changed, 12 insertions(+)