During an exp-run for llvm 15 (see bug 265425), it turned out that devel/libgtop failed to build with clang 15: main.c:226:35: error: incompatible pointer to integer conversion passing 'char[1024]' to parameter of type 'pid_t' (aka 'int') [-Wint-conversion] (server, &resp->u.data.proc_io, parameter); ^~~~~~~~~ ../../include/glibtop/procio.h:78:74: note: passing argument to parameter 'pid' here void glibtop_get_proc_io_l (glibtop *server, glibtop_proc_io *buf, pid_t pid); ^ Indeed the parameter is supposed to be a pid_t, and upstream fixed this in <https://gitlab.gnome.org/GNOME/libgtop/-/commit/df6393ac>.
Created attachment 238648 [details] devel/libgtop: fix build with clang 15
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=2fef1dbd478ea473588cc0f8ec4ff1b3654012a2 commit 2fef1dbd478ea473588cc0f8ec4ff1b3654012a2 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-12-08 22:41:12 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-12-10 08:30:12 +0000 devel/libgtop: unbreak build with clang 15 main.c:226:35: error: incompatible pointer to integer conversion passing 'char[1024]' to parameter of type 'pid_t' (aka 'int') [-Wint-conversion] (server, &resp->u.data.proc_io, parameter); ^~~~~~~~~ ../../include/glibtop/procio.h:78:74: note: passing argument to parameter 'pid' here void glibtop_get_proc_io_l (glibtop *server, glibtop_proc_io *buf, pid_t pid); ^ PR: 268260 Reported by: antoine (via bug 265425 exp-run) devel/libgtop/Makefile | 4 ++++ devel/libgtop/distinfo | 2 ++ 2 files changed, 6 insertions(+)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b27b06ae72722527f8da7fea83387979cc68416e commit b27b06ae72722527f8da7fea83387979cc68416e Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-12-08 22:41:12 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-12-10 08:34:18 +0000 devel/libgtop: unbreak build with clang 15 main.c:226:35: error: incompatible pointer to integer conversion passing 'char[1024]' to parameter of type 'pid_t' (aka 'int') [-Wint-conversion] (server, &resp->u.data.proc_io, parameter); ^~~~~~~~~ ../../include/glibtop/procio.h:78:74: note: passing argument to parameter 'pid' here void glibtop_get_proc_io_l (glibtop *server, glibtop_proc_io *buf, pid_t pid); ^ PR: 268260 Reported by: antoine (via bug 265425 exp-run) (cherry picked from commit 2fef1dbd478ea473588cc0f8ec4ff1b3654012a2) devel/libgtop/Makefile | 4 ++++ devel/libgtop/distinfo | 2 ++ 2 files changed, 6 insertions(+)
Thanks. Landed with cosmetic changes: - dropped redundant bits from the commit message - replaced files/patch-commit-* with PATCHFILES to denote "as is" (without rebase) - bump PORTREVISION due to minor change in runtime behavior (memcpy)