diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2025-12-12 18:47:07 +0300 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2025-12-22 14:11:31 +0300 |
| commit | b4780fe4ddf04b51127a33d705f4a2e224df00fa (patch) | |
| tree | 84020405625f8cad046958877312ca7facc257db | |
| parent | 5ba35a6c13fff0929c34aba6b7602dacbe68686c (diff) | |
| download | linux-b4780fe4ddf04b51127a33d705f4a2e224df00fa.tar.xz | |
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>
| -rw-r--r-- | arch/s390/purgatory/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index 0c196a5b194a..61d240a37633 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -23,6 +23,7 @@ KBUILD_CFLAGS += -D__DISABLE_EXPORTS KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag) KBUILD_CFLAGS += $(call cc-option,-fno-PIE) +KBUILD_CFLAGS += $(call cc-option, -Wno-default-const-init-unsafe) KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) KBUILD_AFLAGS += -D__DISABLE_EXPORTS |
