Skip to content
  • Matti Tiainen's avatar
    Fix undefined behaviour warning from scan-build [CORRECTIVE] · 90ebdeed
    Matti Tiainen authored
    readcpu.c:757:38: warning: The result of the left shift is undefined because the right operand is negative [core.UndefinedBinaryOperatorResult]
      757 |             code = (code & ~smsk) | (srcreg << table68k[opcode].spos);
          |                                             ^  ~~~~~~~~~~~~~~~~~~~~~
    readcpu.c:758:38: warning: The result of the left shift is undefined because the right operand is negative [core.UndefinedBinaryOperatorResult]
      758 |             code = (code & ~dmsk) | (dstreg << table68k[opcode].dpos);
          |                                             ^  ~~~~~~~~~~~~~~~~~~~~~
    6 warnings generated.
    90ebdeed