[Bug 272103] net-im/libpurple: fix build with clang 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 19:28:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272103
Bug ID: 272103
Summary: net-im/libpurple: fix build with clang 16
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: marcus@FreeBSD.org
Reporter: dim@FreeBSD.org
Flags: maintainer-feedback?(marcus@FreeBSD.org)
Assignee: marcus@FreeBSD.org
Clang 16 has a new error about incompatible function types, which shows
up when net-im/libpurple:
auth_cyrus.c:376:23: error: incompatible function pointer types assigning to
'int (*)(void)' from 'int (void *, int, const char **, const char **)'
[-Wincompatible-function-pointer-types]
js->sasl_cb[id].proc = jabber_sasl_cb_realm;
^ ~~~~~~~~~~~~~~~~~~~~
auth_cyrus.c:381:23: error: incompatible function pointer types assigning to
'int (*)(void)' from 'int (void *, int, const char **, unsigned int *)'
[-Wincompatible-function-pointer-types]
js->sasl_cb[id].proc = jabber_sasl_cb_simple;
^ ~~~~~~~~~~~~~~~~~~~~~
auth_cyrus.c:386:23: error: incompatible function pointer types assigning to
'int (*)(void)' from 'int (void *, int, const char **, unsigned int *)'
[-Wincompatible-function-pointer-types]
js->sasl_cb[id].proc = jabber_sasl_cb_simple;
^ ~~~~~~~~~~~~~~~~~~~~~
auth_cyrus.c:393:24: error: incompatible function pointer types assigning to
'int (*)(void)' from 'int (sasl_conn_t *, void *, int, sasl_secret_t **)' (aka
'int (struct sasl_conn *, void *, int, struct sasl_secret **)')
[-Wincompatible-function-pointer-types]
js->sasl_cb[id].proc = jabber_sasl_cb_secret;
^ ~~~~~~~~~~~~~~~~~~~~~
auth_cyrus.c:399:23: error: incompatible function pointer types assigning to
'int (*)(void)' from 'int (void *, int, const char *)'
[-Wincompatible-function-pointer-types]
js->sasl_cb[id].proc = jabber_sasl_cb_log;
^ ~~~~~~~~~~~~~~~~~~
This is because the sasl headers declare the callback functions as
int(*)(void), even when the actual arguments actually different. Cast
the values assigned to the .proc fields to fix the warnings.
--
You are receiving this mail because:
You are the assignee for the bug.