Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Dec 2022 17:57:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 268233] sysutils/py-psutil: fix build with clang 15
Message-ID:  <bug-268233-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268233

            Bug ID: 268233
           Summary: sysutils/py-psutil: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: sunpoet@FreeBSD.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)

During an exp-run for llvm 15 (see bug 265425), it turned out that
sysutils/py-psutil failed to build with clang 15:

  psutil/arch/freebsd/sys_socks.c:70:25: warning: comparison between pointer
and integer ('kvaddr_t' (aka 'unsigned long long') and 'void *')
[-Wpointer-integer-compare]
          if (xf->xf_data =3D=3D sock)
              ~~~~~~~~~~~ ^  ~~~~
  psutil/arch/freebsd/sys_socks.c:182:40: error: incompatible integer to
pointer conversion passing 'kvaddr_t' (aka 'unsigned long long') to paramet=
er
of type 'void *' [-Wint-conversion]
          xf =3D psutil_get_file_from_sock(so->xso_so);
                                         ^~~~~~~~~~
  psutil/arch/freebsd/sys_socks.c:65:33: note: passing argument to parameter
'sock' here
  psutil_get_file_from_sock(void *sock) {
                                  ^
  psutil/arch/freebsd/sys_socks.c:303:40: error: incompatible integer to
pointer conversion passing 'kvaddr_t' (aka 'unsigned long long') to paramet=
er
of type 'void *' [-Wint-conversion]
          xf =3D psutil_get_file_from_sock(xup->xu_socket.xso_so);
                                         ^~~~~~~~~~~~~~~~~~~~~
  psutil/arch/freebsd/sys_socks.c:65:33: note: passing argument to parameter
'sock' here
  psutil_get_file_from_sock(void *sock) {
                                  ^
  1 warning and 2 errors generated.

This can be fixed by adjusting the psutil_get_file_from_sock() function to =
take
a kvaddr_t instead of a void pointer.

--=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-268233-7788>