target/xtensa: disas/xtensa: fix coverity warnings
commit847a6473206607bc6c84f6c537a0fe603ff7aaa6
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 18 Jan 2018 18:08:49 +0000 (18 10:08 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 22 Jan 2018 19:54:58 +0000 (22 11:54 -0800)
tree0772370b77db0673865993020d43121a7eca1152
parent251634f4ce589d17eb0a14e36c65090713eb9e56
target/xtensa: disas/xtensa: fix coverity warnings

Coverity warnings CID 13851461385148 1385149 and 1385150 point that
xtensa_opcode_num_operands and xtensa_format_num_slots may return -1
even when xtensa_opcode_decode and xtensa_format_decode succeed. In that
case unsigned counters used to iterate through operands/slots will not
do the right thing.
Make counters and loop bounds signed to fix the warnings.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
disas/xtensa.c
target/xtensa/translate.c