]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix -Wvoid-pointer-to-enum-cast warnings.
authorBrooks Davis <brooks@FreeBSD.org>
Wed, 15 Apr 2020 18:15:58 +0000 (18:15 +0000)
committerBrooks Davis <brooks@FreeBSD.org>
Wed, 15 Apr 2020 18:15:58 +0000 (18:15 +0000)
commit6671366a55357f11c18837b10d53f8884e7a1251
treebf2114b05e2a9e4970aaf5b5ee729c2db0c2d1b8
parent1565e1889abcc168d751158a9ad9bf8e4095f9e6
Fix -Wvoid-pointer-to-enum-cast warnings.

This pattern is used in callbacks with void * data arguments and seems
both relatively uncommon and relatively harmless.  Silence the warning
by casting through uintptr_t.

This warning is on by default in Clang 11.

Reviewed by: arichardson
Obtained from: CheriBSD (partial)
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24425
lib/libc/gen/getgrent.c
lib/libc/gen/getpwent.c
lib/libc/net/gethostnamadr.c
lib/libc/net/getnetnamadr.c
lib/libc/net/getprotoent.c
lib/libc/net/getservent.c
lib/libc/rpc/getrpcent.c
sys/dev/ocs_fc/ocs_device.c
sys/net80211/ieee80211_output.c