[Bug 266146] Clang prints bogus warning: incompatible pointer types passing 'struct kinfo_proc *' to parameter of type 'struct kinfo_proc *' [-Wincompatible-pointer-types]

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 31 Aug 2022 22:33:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266146

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 to 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=a28f83353243e2298b5f89c0dd6705dfcbda77ea
and have checked locally that it eliminates that warning.

-- 
You are receiving this mail because:
You are the assignee for the bug.