Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2022 22:33:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 266146] Clang prints bogus warning: incompatible pointer types passing 'struct kinfo_proc *' to parameter of type 'struct kinfo_proc *' [-Wincompatible-pointer-types]
Message-ID:  <bug-266146-29464-QW3u5hY9LB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-266146-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-266146-29464@https.bugs.freebsd.org/bugzilla/>

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

Brooks Davis <brooks@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brooks@FreeBSD.org

--- Comment #1 from Brooks Davis <brooks@FreeBSD.org> ---
The warning is weird, but in the current state of things sys/user.h needs t=
o be
included before libprocstat.h for struct kinfo_proc to be declared before
things that use it are declared. I think the issue is that the implicit
declaration shadows the real one and conflicts.

I've fixed this in
https://cgit.freebsd.org/src/commit/?id=3Da28f83353243e2298b5f89c0dd6705dfc=
bda77ea
and have checked locally that it eliminates that warning.

--=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-266146-29464-QW3u5hY9LB>