From: Mark Wielaard Date: Mon, 27 May 2019 18:50:02 +0000 (+0200) Subject: host_amd64_defs.c don't initialize opc and subopc_imm in emit_AMD64Instr. X-Git-Tag: VALGRIND_3_16_0~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38cc5478bca0f858dbe69076ce033f8563b5d2e9;p=thirdparty%2Fvalgrind.git host_amd64_defs.c don't initialize opc and subopc_imm in emit_AMD64Instr. In the case of Ain_SseShiftN we first assign zero to opc and subopc_imm before handling the various subops. But since we will (and must) always assign a valid value to opc and subopc_imm we might get a compiler warning about the values never being read before storing a different value. So explicitly don't assign a value. Then the compiler will warn if we would ever forget to assign it a value value later on before using it. --- diff --git a/VEX/priv/host_amd64_defs.c b/VEX/priv/host_amd64_defs.c index f022b4fa46..29127c1258 100644 --- a/VEX/priv/host_amd64_defs.c +++ b/VEX/priv/host_amd64_defs.c @@ -3952,8 +3952,6 @@ Int emit_AMD64Instr ( /*MB_MOD*/Bool* is_profInc, goto done; case Ain_SseShiftN: { - opc = 0; // invalid - subopc_imm = 0; // invalid UInt limit = 0; UInt shiftImm = i->Ain.SseShiftN.shiftBits; switch (i->Ain.SseShiftN.op) {