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:
Tilmann Scheller
2017-03-09 13:41:26 +01:00
committed by GitHub
parent a2a160d6f9
commit f8dd54abb6
13 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -311,7 +311,7 @@ jerry_process_handshake (int client_socket, /**< client socket */
* false - otherwise
*/
bool
jerry_debugger_accept_connection ()
jerry_debugger_accept_connection (void)
{
int server_socket;
struct sockaddr_in addr;
+1 -1
View File
@@ -37,7 +37,7 @@ jmem_init (void)
* Finalize memory allocators.
*/
void
jmem_finalize ()
jmem_finalize (void)
{
jmem_pools_finalize ();
+1 -1
View File
@@ -191,7 +191,7 @@ jmem_pools_free (void *chunk_p, /**< pointer to the chunk */
* Collect empty pool chunks
*/
void
jmem_pools_collect_empty ()
jmem_pools_collect_empty (void)
{
jmem_pools_chunk_t *chunk_p = JERRY_CONTEXT (jmem_free_8_byte_chunk_p);
JERRY_CONTEXT (jmem_free_8_byte_chunk_p) = NULL;
+1 -1
View File
@@ -488,7 +488,7 @@ re_find_bytecode_in_cache (ecma_string_t *pattern_str_p, /**< pattern string */
* Run gerbage collection in RegExp cache
*/
void
re_cache_gc_run ()
re_cache_gc_run (void)
{
for (uint32_t i = 0u; i < RE_CACHE_SIZE; i++)
{