diff --git a/jerry-core/ecma/base/ecma-helpers-conversion.c b/jerry-core/ecma/base/ecma-helpers-conversion.c index db22503a69..e5c6dd0afb 100644 --- a/jerry-core/ecma/base/ecma-helpers-conversion.c +++ b/jerry-core/ecma/base/ecma-helpers-conversion.c @@ -289,7 +289,7 @@ ecma_uint64_normalize_shift (uint64_t n) /**< integer to count leading zeros in */ ecma_number_t ecma_utf8_string_to_number_by_radix (const lit_utf8_byte_t *str_p, /**< utf-8 string */ - const lit_utf8_size_t string_size, /**< end of utf-8 string */ + lit_utf8_size_t string_size, /**< end of utf-8 string */ uint32_t radix, /**< radix */ uint32_t options) /**< option flags */ { @@ -721,7 +721,7 @@ ecma_number_to_uint32 (ecma_number_t num) /**< ecma-number */ JERRY_ASSERT (num_in_uint32_range < uint64_2_pow_32); uint32_t uint32_num = (uint32_t) num_in_uint32_range; - const uint32_t ret = sign ? -uint32_num : uint32_num; + const uint32_t ret = sign ? (0 - uint32_num) : uint32_num; #ifndef JERRY_NDEBUG if (sign && uint32_num != 0) diff --git a/jerry-core/include/jerryscript-core.h b/jerry-core/include/jerryscript-core.h index b034b10919..d60db37d25 100644 --- a/jerry-core/include/jerryscript-core.h +++ b/jerry-core/include/jerryscript-core.h @@ -602,7 +602,7 @@ jerry_value_t jerry_object_find_own (const jerry_value_t object, * @{ */ jerry_value_t jerry_object_delete (jerry_value_t object, const jerry_value_t key); -jerry_value_t jerry_object_delete_sz (const jerry_value_t object, const char *key_p); +jerry_value_t jerry_object_delete_sz (jerry_value_t object, const char *key_p); jerry_value_t jerry_object_delete_index (jerry_value_t object, uint32_t index); bool jerry_object_delete_internal (jerry_value_t object, const jerry_value_t key); bool jerry_object_delete_native_ptr (jerry_value_t object, const jerry_object_native_info_t *native_info_p); diff --git a/jerry-core/lit/lit-char-helpers.c b/jerry-core/lit/lit-char-helpers.c index ca36a488fb..d87323038a 100644 --- a/jerry-core/lit/lit-char-helpers.c +++ b/jerry-core/lit/lit-char-helpers.c @@ -136,12 +136,13 @@ lit_char_is_white_space (lit_code_point_t c) /**< code point */ return true; } - return (c <= LIT_UTF16_CODE_UNIT_MAX - && ((c >= lit_unicode_white_space_interval_starts[0] - && c <= lit_unicode_white_space_interval_starts[0] + lit_unicode_white_space_interval_lengths[0]) - || lit_search_char_in_array ((ecma_char_t) c, - lit_unicode_white_space_chars, - NUM_OF_ELEMENTS (lit_unicode_white_space_chars)))); + return ( + c <= LIT_UTF16_CODE_UNIT_MAX + && ((c >= lit_unicode_white_space_interval_starts[0] + && c <= (uint32_t) (lit_unicode_white_space_interval_starts[0] + lit_unicode_white_space_interval_lengths[0])) + || lit_search_char_in_array ((ecma_char_t) c, + lit_unicode_white_space_chars, + NUM_OF_ELEMENTS (lit_unicode_white_space_chars)))); } /* lit_char_is_white_space */ /** diff --git a/jerry-core/lit/lit-char-helpers.h b/jerry-core/lit/lit-char-helpers.h index 9b6961776e..fb337be998 100644 --- a/jerry-core/lit/lit-char-helpers.h +++ b/jerry-core/lit/lit-char-helpers.h @@ -234,7 +234,7 @@ size_t lit_code_point_to_cesu8_bytes (uint8_t *dst_p, lit_code_point_t code_poin size_t lit_code_point_get_cesu8_length (lit_code_point_t code_point); void lit_four_byte_utf8_char_to_cesu8 (uint8_t *dst_p, const uint8_t *source_p); uint32_t lit_char_hex_lookup (const lit_utf8_byte_t *buf_p, const lit_utf8_byte_t *const buf_end_p, uint32_t lookup); -uint32_t lit_parse_decimal (const lit_utf8_byte_t **buffer_p, const lit_utf8_byte_t *const buffer_end_p); +uint32_t lit_parse_decimal (const lit_utf8_byte_t **buffer_p, const lit_utf8_byte_t *buffer_end_p); bool lit_find_char_in_string (ecma_string_t *str_p, lit_utf8_byte_t c); /**