Fix LLVM/clang conversion errors (#2473)

This fixes some conversion errors one gets when compiling with
LLVM/clang. Most of them are caused when a bit-specific type (i.e.
`uint16_t`) is implicitly cast to an `enum` of smaller value range.

The fix is just an explicit casting of those types to the desired target
type.

JerryScript-DCO-1.0-Signed-off-by: Martine Lenders m.lenders@fu-berlin.de
This commit is contained in:
Martine Lenders
2018-08-21 08:22:57 +02:00
committed by Zoltan Herczeg
parent 505dace719
commit 851f4f0b89
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -1775,7 +1775,7 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
case ECMA_OBJECT_TYPE_CLASS:
{
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
return ext_object_p->u.class_prop.class_id;
return (lit_magic_string_id_t) ext_object_p->u.class_prop.class_id;
}
case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:
{
@@ -1787,7 +1787,7 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
case ECMA_PSEUDO_ARRAY_TYPEDARRAY:
case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:
{
return ext_obj_p->u.pseudo_array.u1.class_id;
return (lit_magic_string_id_t) ext_obj_p->u.pseudo_array.u1.class_id;
}
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
default: