mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
sys/bus.h: silence warnings about write-only variables
in the generated functions for bus accessors. These are the most noising instances for drivers when non-debug kernel is compiled with clang 13. Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32578
This commit is contained in:
parent
2bd6d910b2
commit
2ff7c2cc4f
|
@ -805,7 +805,7 @@ DECLARE_MODULE(name##_##busname, name##_##busname##_mod, \
|
|||
static __inline type varp ## _get_ ## var(device_t dev) \
|
||||
{ \
|
||||
uintptr_t v; \
|
||||
int e; \
|
||||
int e __diagused; \
|
||||
e = BUS_READ_IVAR(device_get_parent(dev), dev, \
|
||||
ivarp ## _IVAR_ ## ivar, &v); \
|
||||
KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \
|
||||
|
@ -817,7 +817,7 @@ static __inline type varp ## _get_ ## var(device_t dev) \
|
|||
static __inline void varp ## _set_ ## var(device_t dev, type t) \
|
||||
{ \
|
||||
uintptr_t v = (uintptr_t) t; \
|
||||
int e; \
|
||||
int e __diagused; \
|
||||
e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \
|
||||
ivarp ## _IVAR_ ## ivar, v); \
|
||||
KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \
|
||||
|
|
Loading…
Reference in a new issue