arm: fix some warnings reported by MSVC

This commit is contained in:
Nguyen Anh Quynh 2015-02-25 18:01:02 +08:00
parent cd3d186944
commit b756aed7b2
2 changed files with 5 additions and 5 deletions

View File

@ -1059,7 +1059,7 @@ static void printAM3PreOrOffsetIndexOp(MCInst *MI, unsigned Op, SStream *O,
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = (int)ImmOffs;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].subtracted = true;
} else
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = (int)-ImmOffs;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.disp = -(int)ImmOffs;
}
SStream_concat0(O, "]");

View File

@ -24,7 +24,7 @@ struct platform {
int syntax;
};
static char* hex_string(unsigned char *str, int len)
static char *hex_string(unsigned char *str, size_t len)
{
// returns a malloced string that has the hex version of the string in it
// null if failed to malloc
@ -195,8 +195,8 @@ static void test_invalids()
cs_option(handle, CS_OPT_SYNTAX, CS_OPT_SYNTAX_NOREGNAME);
for (j = 0; j < invalid->num_invalid_codes; ++j) {
struct invalid_code * invalid_code = NULL;
char * hex_str = NULL;
struct invalid_code *invalid_code = NULL;
char *hex_str = NULL;
invalid_code = invalid->invalid_codes + j;
@ -234,7 +234,7 @@ struct valid_code {
unsigned char *code;
size_t size;
uint32_t start_addr;
char* expected_out;
char *expected_out;
char *comment;
};