The branch main has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=2ff7c2cc4f28ab05caccb2936ba0d74c6734dd39

commit 2ff7c2cc4f28ab05caccb2936ba0d74c6734dd39
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2021-10-20 13:23:30 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2021-10-20 18:29:49 +0000

    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
---
 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 bf51bdbef387..8544aa32cff8 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -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",      \

Reply via email to