The branch main has been updated by dim:

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

commit b39662fc388678db2b7b5fa3c900205252d15b3b
Author:     Dimitry Andric <[email protected]>
AuthorDate: 2026-01-16 14:02:25 +0000
Commit:     Dimitry Andric <[email protected]>
CommitDate: 2026-01-16 14:02:35 +0000

    vchiq: fix build with clang 21
    
    When compiling vchiq with clang 21, the following -Werror warning is
    produced:
    
        sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c:728:27: error: 
default initialization of an object of type 'VCHIQ_QUEUE_MESSAGE32_T' with 
const member leaves the object uninitialized 
[-Werror,-Wdefault-const-init-field-unsafe]
          728 |                 VCHIQ_QUEUE_MESSAGE32_T args32;
              |                                         ^
        sys/contrib/vchiq/interface/vchiq_arm/vchiq_ioctl.h:151:40: note: 
member 'elements' declared 'const' here
          151 |         const /*VCHIQ_ELEMENT_T * */ uint32_t elements;
              |                                               ^
    
    While the warning is formally correct, the 'args32' object is
    immediately initialized after its declaration. Therefore, suppress the
    warning.
    
    MFC after:      3 days
---
 sys/arm/broadcom/bcm2835/files.bcm283x | 2 +-
 sys/conf/files.arm64                   | 2 +-
 sys/conf/kern.mk                       | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys/arm/broadcom/bcm2835/files.bcm283x 
b/sys/arm/broadcom/bcm2835/files.bcm283x
index 44976f34d35a..cda5a28d3b76 100644
--- a/sys/arm/broadcom/bcm2835/files.bcm283x
+++ b/sys/arm/broadcom/bcm2835/files.bcm283x
@@ -32,7 +32,7 @@ contrib/vchiq/interface/compat/vchi_bsd.c     optional vchiq \
 contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c     optional vchiq \
        compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM 
-D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
 contrib/vchiq/interface/vchiq_arm/vchiq_arm.c  optional vchiq \
-       compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM 
-D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
+       compile-with "${NORMAL_C} -Wno-unused 
${NO_WDEFAULT_CONST_INIT_FIELD_UNSAFE} -DUSE_VCHIQ_ARM 
-D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
 contrib/vchiq/interface/vchiq_arm/vchiq_connected.c    optional vchiq \
        compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 
-I$S/contrib/vchiq"
 contrib/vchiq/interface/vchiq_arm/vchiq_core.c optional vchiq \
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index ee1108eca0d4..2efdb21f66ad 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -629,7 +629,7 @@ contrib/vchiq/interface/compat/vchi_bsd.c           
optional vchiq soc_brcm_bcm2837 fdt \
 contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c     optional vchiq 
soc_brcm_bcm2837 fdt \
        compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM 
-D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
 contrib/vchiq/interface/vchiq_arm/vchiq_arm.c          optional vchiq 
soc_brcm_bcm2837 fdt \
-       compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM 
-D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
+       compile-with "${NORMAL_C} -Wno-unused 
${NO_WDEFAULT_CONST_INIT_FIELD_UNSAFE} -DUSE_VCHIQ_ARM 
-D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq"
 contrib/vchiq/interface/vchiq_arm/vchiq_connected.c    optional vchiq 
soc_brcm_bcm2837 fdt \
        compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 
-I$S/contrib/vchiq"
 contrib/vchiq/interface/vchiq_arm/vchiq_core.c         optional vchiq 
soc_brcm_bcm2837 fdt \
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 4e18a1300791..e86ffb684f9a 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -37,6 +37,9 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL=       
-Wno-bitwise-instead-of-logical
 NO_WSTRICT_PROTOTYPES=         -Wno-strict-prototypes
 NO_WDEPRECATED_NON_PROTOTYPE=  -Wno-deprecated-non-prototype
 .endif
+.if ${COMPILER_VERSION} >= 210000
+NO_WDEFAULT_CONST_INIT_FIELD_UNSAFE= -Wno-default-const-init-field-unsafe
+.endif
 # Several other warnings which might be useful in some cases, but not severe
 # enough to error out the whole kernel build.  Display them anyway, so there is
 # some incentive to fix them eventually.

Reply via email to