Skip to content
/ linux Public

Commit 33b5414

Browse files
hcahcaSasha Levin
authored andcommitted
s390/purgatory: Add -Wno-default-const-init-unsafe to KBUILD_CFLAGS
[ Upstream commit b4780fe ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 251ce93 commit 33b5414

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/s390/purgatory/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ KBUILD_CFLAGS += -fno-stack-protector
2929
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
3030
KBUILD_CFLAGS += $(CLANG_FLAGS)
3131
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
32+
KBUILD_CFLAGS += $(call cc-option, -Wno-default-const-init-unsafe)
3233
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
3334

3435
# Since we link purgatory with -r unresolved symbols are not checked, so we

0 commit comments

Comments
 (0)