]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/purgatory: Add -Wno-default-const-init-unsafe to KBUILD_CFLAGS
authorHeiko Carstens <hca@linux.ibm.com>
Fri, 12 Dec 2025 15:47:07 +0000 (16:47 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 22 Dec 2025 11:11:31 +0000 (12:11 +0100)
commitb4780fe4ddf04b51127a33d705f4a2e224df00fa
tree84020405625f8cad046958877312ca7facc257db
parent5ba35a6c13fff0929c34aba6b7602dacbe68686c
s390/purgatory: Add -Wno-default-const-init-unsafe to KBUILD_CFLAGS

Add -Wno-default-const-init-unsafe to purgatory KBUILD_CFLAGS, similar
to scripts/Makefile.extrawarn, since clang generates warnings for the
dummy variable in typecheck():

    CC      arch/s390/purgatory/purgatory.o
      arch/s390/include/asm/ptrace.h:221:9: warning: default initialization of an object of type 'typeof (regs->psw)' (aka 'const psw_t') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
        221 |         return psw_bits(regs->psw).pstate;
            |                ^
      arch/s390/include/asm/ptrace.h:98:2: note: expanded from macro 'psw_bits'
         98 |         typecheck(psw_t, __psw);                \
            |         ^
      include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
         11 |         typeof(x) __dummy2; \
            |                   ^

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/purgatory/Makefile