]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
host_amd64_defs.c don't initialize opc and subopc_imm in emit_AMD64Instr.
authorMark Wielaard <mark@klomp.org>
Mon, 27 May 2019 18:50:02 +0000 (20:50 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 27 May 2019 18:50:02 +0000 (20:50 +0200)
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.

VEX/priv/host_amd64_defs.c

index f022b4fa46b21ad9a6ee7d877df2eed2a2813fc5..29127c1258c54911b0cb104949614837f7bb8ab3 100644 (file)
@@ -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) {