Skip to content

Use '-Werror' instead of '-Werror=...' for Jerry libc #949

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

Merged
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the if-else construct? Cannot we just leave add_jerry_compile_warnings(logical-op) in place and add

if(${USE_JERRY_LIBC})
 add_jerry_compile_flags(-Werror)
else()

add_jerry_compile_warnings(logical-op)
else()
add_jerry_compile_flags(-Wno-nested-anon-types)
Expand Down
2 changes: 1 addition & 1 deletion jerry-core/ecma/base/ecma-helpers-string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down