Silencing Clang warning bys casting values

Warnings were: "Implicit conversion loses integer precision: 'size_t' to 'cs_mode'/'cs_opt_value'"
test2
Félix Cloutier 10 years ago committed by Nguyen Anh Quynh
parent 1f151f997c
commit 3973d8b11e
  1. 2
      arch/ARM/ARMModule.c
  2. 2
      arch/Mips/MipsModule.c
  3. 2
      arch/X86/X86Module.c
  4. 2
      cs.c

@ -48,7 +48,7 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
else
handle->disasm = ARM_getInstruction;
handle->mode = value;
handle->mode = (cs_mode)value;
break;
case CS_OPT_SYNTAX:
ARM_getRegName(handle, (int)value);

@ -46,7 +46,7 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
else
handle->disasm = Mips64_getInstruction;
handle->mode = value;
handle->mode = (cs_mode)value;
}
return CS_ERR_OK;
}

@ -51,7 +51,7 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
else
handle->regsize_map = regsize_map_32;
handle->mode = value;
handle->mode = (cs_mode)value;
break;
case CS_OPT_SYNTAX:
switch(value) {

@ -363,7 +363,7 @@ cs_err cs_option(csh ud, cs_opt_type type, size_t value)
default:
break;
case CS_OPT_DETAIL:
handle->detail = value;
handle->detail = (cs_opt_value)value;
return CS_ERR_OK;
case CS_OPT_SKIPDATA:
handle->skipdata = (value == CS_OPT_ON);

Loading…
Cancel
Save