diff --git a/CMakeLists.txt b/CMakeLists.txt index 2930fe3fa8..9431ceac4f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,6 +273,9 @@ project (Jerry C ASM) add_jerry_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations pedantic) add_jerry_compile_flags(-Wno-stack-protector -Wno-attributes) if(CMAKE_COMPILER_IS_GNUCC) + if(${USE_JERRY_LIBC}) + add_jerry_compile_flags(-Werror) + endif() add_jerry_compile_warnings(logical-op) else() add_jerry_compile_flags(-Wno-nested-anon-types) diff --git a/jerry-core/ecma/base/ecma-helpers-string.c b/jerry-core/ecma/base/ecma-helpers-string.c index 19f65e9f5c..50384ba71d 100644 --- a/jerry-core/ecma/base/ecma-helpers-string.c +++ b/jerry-core/ecma/base/ecma-helpers-string.c @@ -918,7 +918,7 @@ ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, /**< ecma- return false; } - const lit_utf8_byte_t *utf8_string1_p, *utf8_string2_p; + lit_utf8_byte_t *utf8_string1_p, *utf8_string2_p; bool is_utf8_string1_on_heap = false, is_utf8_string2_on_heap = false; lit_utf8_byte_t utf8_string1_buffer[ECMA_MAX_CHARS_IN_STRINGIFIED_NUMBER]; lit_utf8_size_t utf8_string1_size;