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)
|
jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
if(JERRY_LIBC)
|
|
||||||
jerry_add_compile_flags(-Werror)
|
|
||||||
endif()
|
|
||||||
jerry_add_compile_warnings(logical-op)
|
jerry_add_compile_warnings(logical-op)
|
||||||
else()
|
else()
|
||||||
jerry_add_compile_flags(-Wno-nested-anon-types -Wno-static-in-inline)
|
jerry_add_compile_flags(-Wno-nested-anon-types -Wno-static-in-inline)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(JERRY_LIBC)
|
||||||
|
jerry_add_compile_flags(-Werror)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(DEFINED EXTERNAL_COMPILE_FLAGS)
|
if(DEFINED EXTERNAL_COMPILE_FLAGS)
|
||||||
jerry_add_compile_flags(${EXTERNAL_COMPILE_FLAGS})
|
jerry_add_compile_flags(${EXTERNAL_COMPILE_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -267,7 +267,7 @@ rand (void)
|
|||||||
libc_random_gen_state[3] ^= libc_random_gen_state[3] >> 19;
|
libc_random_gen_state[3] ^= libc_random_gen_state[3] >> 19;
|
||||||
libc_random_gen_state[3] ^= intermediate;
|
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 */
|
} /* rand */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user