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
@@ -204,7 +204,7 @@ lit_is_utf8_string_magic (const lit_utf8_byte_t *string_p, /**< utf-8 string */
while (first < last)
{
lit_utf8_size_t middle = ((first + last) / 2); /**< mid point of search */
int compare = memcmp (lit_get_magic_string_utf8 (middle), string_p, string_size);
int compare = memcmp (lit_get_magic_string_utf8 ((lit_magic_string_id_t) middle), string_p, string_size);
if (compare == 0)
{
@@ -249,7 +249,7 @@ lit_is_utf8_string_pair_magic (const lit_utf8_byte_t *string1_p, /**< first utf-
while (first < last)
{
lit_utf8_size_t middle = ((first + last) / 2); /**< mid point of search */
const lit_utf8_byte_t *middle_string_p = lit_get_magic_string_utf8 (middle);
const lit_utf8_byte_t *middle_string_p = lit_get_magic_string_utf8 ((lit_magic_string_id_t) middle);
int compare = memcmp (middle_string_p, string1_p, string1_size);