From a72cbda6de5052e539feedd77972a42fce9e514a Mon Sep 17 00:00:00 2001 From: mio Date: Thu, 30 Dec 2021 00:51:07 +0100 Subject: [PATCH] Initialize empty structs explictly to build on MSVC --- qemu/target/s390x/translate.c | 4 ++-- qemu/target/s390x/vec_fpu_helper.c | 12 ++++++------ qemu/target/s390x/vec_helper.c | 4 ++-- qemu/target/s390x/vec_int_helper.c | 2 +- qemu/target/s390x/vec_string_helper.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/qemu/target/s390x/translate.c b/qemu/target/s390x/translate.c index 9903b0ca..76c031c1 100644 --- a/qemu/target/s390x/translate.c +++ b/qemu/target/s390x/translate.c @@ -1132,7 +1132,7 @@ typedef struct DisasFormatInfo { #define I(N, B, S) { B, S, 1, FLD_C_i##N, FLD_O_i##N } #define L(N, B, S) { B, S, 0, FLD_C_l##N, FLD_O_l##N } -#define F0(N) { { } }, +#define F0(N) { { 0 } }, #define F1(N, X1) { { X1 } }, #define F2(N, X1, X2) { { X1, X2 } }, #define F3(N, X1, X2, X3) { { X1, X2, X3 } }, @@ -6675,7 +6675,7 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) TCGContext *tcg_ctx = s->uc->tcg_ctx; const DisasInsn *insn; DisasJumpType ret = DISAS_NEXT; - DisasOps o = {}; + DisasOps o = { 0 }; /* Search for the insn in the table. */ insn = extract_insn(env, s); diff --git a/qemu/target/s390x/vec_fpu_helper.c b/qemu/target/s390x/vec_fpu_helper.c index a48bd704..e87ef56f 100644 --- a/qemu/target/s390x/vec_fpu_helper.c +++ b/qemu/target/s390x/vec_fpu_helper.c @@ -84,7 +84,7 @@ static void vop64_2(S390Vector *v1, const S390Vector *v2, CPUS390XState *env, uintptr_t retaddr) { uint8_t vxc, vec_exc = 0; - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i, old_mode; old_mode = s390_swap_bfp_rounding_mode(env, erm); @@ -108,7 +108,7 @@ static void vop64_3(S390Vector *v1, const S390Vector *v2, const S390Vector *v3, uintptr_t retaddr) { uint8_t vxc, vec_exc = 0; - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i; for (i = 0; i < 2; i++) { @@ -179,7 +179,7 @@ static int vfc64(S390Vector *v1, const S390Vector *v2, const S390Vector *v3, CPUS390XState *env, bool s, vfc64_fn fn, uintptr_t retaddr) { uint8_t vxc, vec_exc = 0; - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int match = 0; int i; @@ -414,7 +414,7 @@ static void vfll32(S390Vector *v1, const S390Vector *v2, CPUS390XState *env, bool s, uintptr_t retaddr) { uint8_t vxc, vec_exc = 0; - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i; for (i = 0; i < 2; i++) { @@ -449,7 +449,7 @@ static void vflr64(S390Vector *v1, const S390Vector *v2, CPUS390XState *env, bool s, bool XxC, uint8_t erm, uintptr_t retaddr) { uint8_t vxc, vec_exc = 0; - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i, old_mode; old_mode = s390_swap_bfp_rounding_mode(env, erm); @@ -510,7 +510,7 @@ static void vfma64(S390Vector *v1, const S390Vector *v2, const S390Vector *v3, uintptr_t retaddr) { uint8_t vxc, vec_exc = 0; - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i; for (i = 0; i < 2; i++) { diff --git a/qemu/target/s390x/vec_helper.c b/qemu/target/s390x/vec_helper.c index 986e7cc8..fb774da3 100644 --- a/qemu/target/s390x/vec_helper.c +++ b/qemu/target/s390x/vec_helper.c @@ -30,7 +30,7 @@ void HELPER(vll)(CPUS390XState *env, void *v1, uint64_t addr, uint64_t bytes) s390_vec_write_element64(v1, 0, t0); s390_vec_write_element64(v1, 1, t1); } else { - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i; for (i = 0; i < bytes; i++) { @@ -178,7 +178,7 @@ void HELPER(vstl)(CPUS390XState *env, const void *v1, uint64_t addr, addr = wrap_address(env, addr + 8); cpu_stq_data_ra(env, addr, s390_vec_read_element64(v1, 1), GETPC()); } else { - S390Vector tmp = {}; + S390Vector tmp = { 0 }; int i; for (i = 0; i < bytes; i++) { diff --git a/qemu/target/s390x/vec_int_helper.c b/qemu/target/s390x/vec_int_helper.c index 0d6bc13d..b8144139 100644 --- a/qemu/target/s390x/vec_int_helper.c +++ b/qemu/target/s390x/vec_int_helper.c @@ -186,7 +186,7 @@ DEF_GALOIS_MULTIPLY(32, 64) static S390Vector galois_multiply64(uint64_t a, uint64_t b) { - S390Vector res = {}; + S390Vector res = { 0 }; S390Vector va = { .doubleword[1] = a, }; diff --git a/qemu/target/s390x/vec_string_helper.c b/qemu/target/s390x/vec_string_helper.c index c516c0ce..c75152fe 100644 --- a/qemu/target/s390x/vec_string_helper.c +++ b/qemu/target/s390x/vec_string_helper.c @@ -350,7 +350,7 @@ static int vstrc(void *v1, const void *v2, const void *v3, const void *v4, uint64_t a0 = s390_vec_read_element64(v2, 0); uint64_t a1 = s390_vec_read_element64(v2, 1); int first_zero = 16, first_match = 16; - S390Vector rt_result = {}; + S390Vector rt_result = { 0 }; uint64_t z0, z1; int i, j;