mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix -Wsign-conversion Clang warning.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
parent
27deda5712
commit
caee6f738e
@ -178,14 +178,15 @@ jerry_add_compile_warnings(all extra format-nonliteral init-self conversion sign
|
||||
jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(JERRY_LIBC)
|
||||
jerry_add_compile_flags(-Werror)
|
||||
endif()
|
||||
jerry_add_compile_warnings(logical-op)
|
||||
else()
|
||||
jerry_add_compile_flags(-Wno-nested-anon-types -Wno-static-in-inline)
|
||||
endif()
|
||||
|
||||
if(JERRY_LIBC)
|
||||
jerry_add_compile_flags(-Werror)
|
||||
endif()
|
||||
|
||||
if(DEFINED EXTERNAL_COMPILE_FLAGS)
|
||||
jerry_add_compile_flags(${EXTERNAL_COMPILE_FLAGS})
|
||||
endif()
|
||||
|
||||
@ -267,7 +267,7 @@ rand (void)
|
||||
libc_random_gen_state[3] ^= libc_random_gen_state[3] >> 19;
|
||||
libc_random_gen_state[3] ^= intermediate;
|
||||
|
||||
return libc_random_gen_state[3] % (RAND_MAX + 1u);
|
||||
return (int) (libc_random_gen_state[3] % (RAND_MAX + 1));
|
||||
} /* rand */
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user