Date: Sat, 20 May 2023 18:30:58 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 271537] net/libfabric: fix build with clang 16 on i386 Message-ID: <bug-271537-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271537 Bug ID: 271537 Summary: net/libfabric: fix build with clang 16 on i386 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: yuri@freebsd.org Reporter: dim@FreeBSD.org Assignee: yuri@freebsd.org Flags: maintainer-feedback?(yuri@freebsd.org) Clang 16 has a new error about incompatible function types, which shows up when building net/libfabric (on i386): prov/hook/src/hook_domain.c:124:12: error: incompatible function pointer types passing 'ssize_t (struct fid_ep *, size_t)' (aka 'int (struct fid_ep = *, unsigned int)') to parameter of type 'ssize_t (*)(struct fid_ep *, uint64_t= )' (aka 'int (*)(struct fid_ep *, unsigned long long)') [-Wincompatible-function-pointer-types] hook_credit_handler); ^~~~~~~~~~~~~~~~~~~ prov/hook/src/hook_domain.c:150:17: error: incompatible function pointer types initializing 'void (*)(struct fid_ep *, uint64_t)' (aka 'void (*)(str= uct fid_ep *, unsigned long long)') with an expression of type 'void (struct fi= d_ep *, size_t)' (aka 'void (struct fid_ep *, unsigned int)') [-Wincompatible-function-pointer-types] .add_credits =3D hook_add_credits, ^~~~~~~~~~~~~~~~ prov/hook/src/hook_domain.c:152:22: error: incompatible function pointer types initializing 'void (*)(struct fid_domain *, ssize_t (*)(struct fid_ep= *, uint64_t))' (aka 'void (*)(struct fid_domain *, int (*)(struct fid_ep *, unsigned long long))') with an expression of type 'void (struct fid_domain = *, ssize_t (*)(struct fid_ep *, size_t))' (aka 'void (struct fid_domain *, int (*)(struct fid_ep *, unsigned int))') [-Wincompatible-function-pointer-type= s] .set_send_handler =3D hook_set_send_handler, ^~~~~~~~~~~~~~~~~~~~~ The problem is that the 'credits' parameter used in these functions is size_t in some cases, but uint64_t in other cases. On LP64 architectures this does not result in any errors, but on e.g. i386 you get the above. Make the 'credits' parameter uint64_t everywhere to fix this issue. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271537-7788>