mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-27 07:20:33 +00:00
Silencing Clang warning bys casting values
Warnings were: "Implicit conversion loses integer precision: 'size_t' to 'cs_mode'/'cs_opt_value'"
This commit is contained in:
parent
cc8fd38aa2
commit
c141af9052
@ -48,7 +48,7 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
|
|||||||
else
|
else
|
||||||
handle->disasm = ARM_getInstruction;
|
handle->disasm = ARM_getInstruction;
|
||||||
|
|
||||||
handle->mode = value;
|
handle->mode = (cs_mode)value;
|
||||||
break;
|
break;
|
||||||
case CS_OPT_SYNTAX:
|
case CS_OPT_SYNTAX:
|
||||||
ARM_getRegName(handle, (int)value);
|
ARM_getRegName(handle, (int)value);
|
||||||
|
@ -46,7 +46,7 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
|
|||||||
else
|
else
|
||||||
handle->disasm = Mips64_getInstruction;
|
handle->disasm = Mips64_getInstruction;
|
||||||
|
|
||||||
handle->mode = value;
|
handle->mode = (cs_mode)value;
|
||||||
}
|
}
|
||||||
return CS_ERR_OK;
|
return CS_ERR_OK;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ static cs_err option(cs_struct *handle, cs_opt_type type, size_t value)
|
|||||||
else
|
else
|
||||||
handle->regsize_map = regsize_map_32;
|
handle->regsize_map = regsize_map_32;
|
||||||
|
|
||||||
handle->mode = value;
|
handle->mode = (cs_mode)value;
|
||||||
break;
|
break;
|
||||||
case CS_OPT_SYNTAX:
|
case CS_OPT_SYNTAX:
|
||||||
switch(value) {
|
switch(value) {
|
||||||
|
2
cs.c
2
cs.c
@ -363,7 +363,7 @@ cs_err cs_option(csh ud, cs_opt_type type, size_t value)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case CS_OPT_DETAIL:
|
case CS_OPT_DETAIL:
|
||||||
handle->detail = value;
|
handle->detail = (cs_opt_value)value;
|
||||||
return CS_ERR_OK;
|
return CS_ERR_OK;
|
||||||
case CS_OPT_SKIPDATA:
|
case CS_OPT_SKIPDATA:
|
||||||
handle->skipdata = (value == CS_OPT_ON);
|
handle->skipdata = (value == CS_OPT_ON);
|
||||||
|
Loading…
Reference in New Issue
Block a user