git: 958335164054 - stable/13 - sys/bus.h: silence warnings about write-only variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Oct 2021 00:45:17 UTC
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9583351640540846bee811008d452564b792505d commit 9583351640540846bee811008d452564b792505d Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-10-20 13:23:30 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-10-27 00:24:40 +0000 sys/bus.h: silence warnings about write-only variables (cherry picked from commit 2ff7c2cc4f28ab05caccb2936ba0d74c6734dd39) --- sys/sys/bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index fbc69ca625c1..fa2b17008691 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -800,7 +800,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", \ @@ -812,7 +812,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", \