From 4b68d9505e8aeed6669421937423c83983681bc6 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Wed, 25 Feb 2015 18:01:02 +0800 Subject: [PATCH] arm: fix some warnings reported by MSVC --- arch/ARM/ARMInstPrinter.c | 2 +- suite/arm/test_arm_regression.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c index 12a6c056..95008613 100644 --- a/arch/ARM/ARMInstPrinter.c +++ b/arch/ARM/ARMInstPrinter.c @@ -1058,7 +1058,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, "]"); diff --git a/suite/arm/test_arm_regression.c b/suite/arm/test_arm_regression.c index 0f5f5810..9e8d228e 100644 --- a/suite/arm/test_arm_regression.c +++ b/suite/arm/test_arm_regression.c @@ -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; };