Bug 278706

Summary: multimedia/vlc: fix build with FREERDP option ON: incompatible function pointer types
Product: Ports & Packages Reporter: Vladimir Druzenko <vvd>
Component: Individual Port(s)Assignee: Daniel Engberg <diizzy>
Status: Closed FIXED    
Severity: Affects Some People CC: diizzy, vvd
Priority: --- Flags: bugzilla: maintainer-feedback? (multimedia)
vvd: maintainer-feedback?
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
fix build with FREERDP option ON vvd: maintainer-approval?

Description Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-03 00:25:08 UTC
Created attachment 250338 [details]
fix build with FREERDP option ON

Build log:

access/rdp.c:238:39: error: incompatible function pointer types assigning to 'pDesktopResize' (aka 'int (*)(struct rdp_context *)') from 'void (rdpContext *)' (aka 'void (struct rdp_context *)') [-Wincompatible-function-pointer-types]
  238 |     p_instance->update->DesktopResize = desktopResizeHandler;
      |                                       ^ ~~~~~~~~~~~~~~~~~~~~
access/rdp.c:239:36: error: incompatible function pointer types assigning to 'pBeginPaint' (aka 'int (*)(struct rdp_context *)') from 'void (rdpContext *)' (aka 'void (struct rdp_context *)') [-Wincompatible-function-pointer-types]
  239 |     p_instance->update->BeginPaint = beginPaintHandler;
      |                                    ^ ~~~~~~~~~~~~~~~~~
access/rdp.c:240:34: error: incompatible function pointer types assigning to 'pEndPaint' (aka 'int (*)(struct rdp_context *)') from 'void (rdpContext *)' (aka 'void (struct rdp_context *)') [-Wincompatible-function-pointer-types]
  240 |     p_instance->update->EndPaint = endPaintHandler;
      |                                  ^ ~~~~~~~~~~~~~~~

access/rdp.c:427:35: error: incompatible function pointer types assigning to 'pPreConnect' (aka 'int (*)(struct rdp_freerdp *)') from 'bool (freerdp *)' (aka 'bool (struct rdp_freerdp *)') [-Wincompatible-function-pointer-types]
  427 |     p_sys->p_instance->PreConnect = preConnectHandler;
      |                                   ^ ~~~~~~~~~~~~~~~~~
access/rdp.c:428:36: error: incompatible function pointer types assigning to 'pPostConnect' (aka 'int (*)(struct rdp_freerdp *)') from 'bool (freerdp *)' (aka 'bool (struct rdp_freerdp *)') [-Wincompatible-function-pointer-types]
  428 |     p_sys->p_instance->PostConnect = postConnectHandler;
      |                                    ^ ~~~~~~~~~~~~~~~~~~
access/rdp.c:429:37: error: incompatible function pointer types assigning to 'pAuthenticate' (aka 'int (*)(struct rdp_freerdp *, char **, char **, char **)') from 'bool (freerdp *, char **, char **, char **)' (aka 'bool (struct rdp_freerdp *, char **, char **, char **)') [-Wincompatible-function-pointer-types]
  429 |     p_sys->p_instance->Authenticate = authenticateHandler;
      |                                     ^ ~~~~~~~~~~~~~~~~~~~

Can be "fixed" with "CFLAGS=-Wno-error=incompatible-function-pointer-types".
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-03 00:26:23 UTC
https://reviews.freebsd.org/D45071
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-05-11 11:39:05 UTC
A commit in branch main references this bug:

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

commit 437d793b6649e6d3b15bbc868187150b8aa3cfd7
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-05-11 11:36:51 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-05-11 11:38:32 +0000

    multimedia/vlc: Fix build with FREERDP option enabled

    Fixes build on FreeBSD 13.3 and 14+

    PR:             278706
    Differential Revision:  https://reviews.freebsd.org/D45071

 multimedia/vlc/Makefile | 1 +
 1 file changed, 1 insertion(+)