diff --git a/arch/AArch64/AArch64Disassembler.c b/arch/AArch64/AArch64Disassembler.c index 600d402b..41dd4881 100644 --- a/arch/AArch64/AArch64Disassembler.c +++ b/arch/AArch64/AArch64Disassembler.c @@ -224,7 +224,6 @@ static DecodeStatus _getInstruction(cs_struct *ud, MCInst *MI, { uint32_t insn; DecodeStatus result; - int i; if (code_len < 4) { // not enough data @@ -234,7 +233,7 @@ static DecodeStatus _getInstruction(cs_struct *ud, MCInst *MI, if (MI->flat_insn->detail) { memset(MI->flat_insn->detail, 0, sizeof(cs_detail)); - for (i = 0; i < ARR_SIZE(MI->flat_insn->detail->arm64.operands); i++) + for (size_t i = 0; i < ARR_SIZE(MI->flat_insn->detail->arm64.operands); i++) MI->flat_insn->detail->arm64.operands[i].vector_index = -1; } diff --git a/arch/ARM/ARMDisassembler.c b/arch/ARM/ARMDisassembler.c index 9846e59a..f4c6d7a2 100644 --- a/arch/ARM/ARMDisassembler.c +++ b/arch/ARM/ARMDisassembler.c @@ -687,7 +687,6 @@ static DecodeStatus _Thumb_getInstruction(cs_struct *ud, MCInst *MI, const uint8 bool InITBlock; unsigned Firstcond, Mask; uint32_t NEONLdStInsn, insn32, NEONDataInsn, NEONCryptoInsn, NEONv8Insn; - int i; // We want to read exactly 2 bytes of data. if (code_len < 2) @@ -698,7 +697,7 @@ static DecodeStatus _Thumb_getInstruction(cs_struct *ud, MCInst *MI, const uint8 if (MI->flat_insn->detail) { memset(&MI->flat_insn->detail->arm, 0, sizeof(cs_arm)); - for (i = 0; i < ARR_SIZE(MI->flat_insn->detail->arm.operands); i++) + for (size_t i = 0; i < ARR_SIZE(MI->flat_insn->detail->arm.operands); i++) MI->flat_insn->detail->arm.operands[i].vector_index = -1; } diff --git a/arch/PowerPC/PPCMapping.c b/arch/PowerPC/PPCMapping.c index ef354ee7..ee2d4b45 100644 --- a/arch/PowerPC/PPCMapping.c +++ b/arch/PowerPC/PPCMapping.c @@ -8089,9 +8089,7 @@ static struct ppc_alias alias_insn_name_maps[] = { // given alias mnemonic, return instruction ID & CC bool PPC_alias_insn(const char *name, struct ppc_alias *alias) { - int i; - - for(i = 0; i < ARR_SIZE(alias_insn_name_maps); i++) { + for(size_t i = 0; i < ARR_SIZE(alias_insn_name_maps); i++) { if (!strcmp(name, alias_insn_name_maps[i].mnem)) { alias->id = alias_insn_name_maps[i].id; alias->cc = alias_insn_name_maps[i].cc; @@ -8100,7 +8098,7 @@ bool PPC_alias_insn(const char *name, struct ppc_alias *alias) } // not really an alias insn - i = name2id(&insn_name_maps[1], ARR_SIZE(insn_name_maps) - 1, name); + int i = name2id(&insn_name_maps[1], ARR_SIZE(insn_name_maps) - 1, name); if (i != -1) { alias->id = insn_name_maps[i].id; alias->cc = PPC_BC_INVALID;