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.
This commit is contained in:
Mark Wielaard
2019-05-27 20:50:02 +02:00
parent 461cc5c003
commit 38cc5478bc

View 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) {