074df27f74
There are void * pointers that get casted to enums, in cpu_models.c Such casts can result in a small integer type and are caught as warnings with clang, starting with version 11: Clang 11 finds a bunch of spots in the code that trigger this new warnings: ../qemu-base/target/s390x/cpu_models.c:985:21: error: cast to smaller integer type 'S390Feat' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] S390Feat feat = (S390Feat) opaque; ^~~~~~~~~~~~~~~~~ ../qemu-base/target/s390x/cpu_models.c:1002:21: error: cast to smaller integer type 'S390Feat' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] S390Feat feat = (S390Feat) opaque; ^~~~~~~~~~~~~~~~~ ../qemu-base/target/s390x/cpu_models.c:1036:27: error: cast to smaller integer type 'S390FeatGroup' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] S390FeatGroup group = (S390FeatGroup) opaque; ^~~~~~~~~~~~~~~~~~~~~~ ../qemu-base/target/s390x/cpu_models.c:1057:27: error: cast to smaller integer type 'S390FeatGroup' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast] S390FeatGroup group = (S390FeatGroup) opaque; ^~~~~~~~~~~~~~~~~~~~~~ 4 errors generated. Avoid this warning by casting the pointer to uintptr_t first. Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com> Message-Id: <20201105221905.1350-3-dbuono@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
arch_dump.c | ||
cc_helper.c | ||
cpu_features_def.h | ||
cpu_features_def.h.inc | ||
cpu_features.c | ||
cpu_features.h | ||
cpu_models.c | ||
cpu_models.h | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
crypto_helper.c | ||
diag.c | ||
excp_helper.c | ||
fpu_helper.c | ||
gdbstub.c | ||
gen-features.c | ||
helper.c | ||
helper.h | ||
insn-data.def | ||
insn-format.def | ||
int_helper.c | ||
internal.h | ||
interrupt.c | ||
ioinst.c | ||
kvm_s390x.h | ||
kvm-stub.c | ||
kvm.c | ||
machine.c | ||
mem_helper.c | ||
meson.build | ||
misc_helper.c | ||
mmu_helper.c | ||
s390-tod.h | ||
sigp.c | ||
tcg_s390x.h | ||
tcg-stub.c | ||
trace-events | ||
trace.h | ||
translate_vx.c.inc | ||
translate.c | ||
vec_fpu_helper.c | ||
vec_helper.c | ||
vec_int_helper.c | ||
vec_string_helper.c | ||
vec.h |