Fix old-style function definitions and enable warning. (#1651)
Function definitions with no parameters should always use the void keyword to allow the compiler to catch invalid calls of those functions at compile time. Enable -Wold-style-definition to catch this early in the future. Fixes #1649. JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
This commit is contained in:
+1
-1
@@ -179,7 +179,7 @@ jerry_add_compile_flags(-fno-stack-protector)
|
||||
endif()
|
||||
|
||||
if (USING_GCC OR USING_CLANG)
|
||||
jerry_add_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations shadow strict-prototypes undef)
|
||||
jerry_add_compile_warnings(all extra format-nonliteral init-self conversion sign-conversion format-security missing-declarations shadow strict-prototypes undef old-style-definition)
|
||||
jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user