Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes msvc warnings #4976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jerry-core/ecma/base/ecma-helpers-conversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
{
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/include/jerryscript-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 7 additions & 6 deletions jerry-core/lit/lit-char-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

/**
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/lit/lit-char-helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down