Skip to content

Commit 19f0789

Browse files
author
Tilmann Scheller
committed
Fix old-style function definitions.
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. Fixes #1649. JerryScript-DCO-1.0-Signed-off-by: Tilmann Scheller t.scheller@samsung.com
1 parent a2a160d commit 19f0789

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

docs/05.PORT-API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p)
196196
/**
197197
* Default implementation of jerry_port_get_current_time.
198198
*/
199-
double jerry_port_get_current_time ()
199+
double jerry_port_get_current_time (void)
200200
{
201201
struct timeval tv;
202202

jerry-core/jmem/jmem-allocator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jmem_init (void)
3737
* Finalize memory allocators.
3838
*/
3939
void
40-
jmem_finalize ()
40+
jmem_finalize (void)
4141
{
4242
jmem_pools_finalize ();
4343

jerry-core/jmem/jmem-poolman.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jmem_pools_free (void *chunk_p, /**< pointer to the chunk */
191191
* Collect empty pool chunks
192192
*/
193193
void
194-
jmem_pools_collect_empty ()
194+
jmem_pools_collect_empty (void)
195195
{
196196
jmem_pools_chunk_t *chunk_p = JERRY_CONTEXT (jmem_free_8_byte_chunk_p);
197197
JERRY_CONTEXT (jmem_free_8_byte_chunk_p) = NULL;

jerry-core/parser/regexp/re-compiler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ re_find_bytecode_in_cache (ecma_string_t *pattern_str_p, /**< pattern string */
488488
* Run gerbage collection in RegExp cache
489489
*/
490490
void
491-
re_cache_gc_run ()
491+
re_cache_gc_run (void)
492492
{
493493
for (uint32_t i = 0u; i < RE_CACHE_SIZE; i++)
494494
{

targets/curie_bsp/source/curie-bsp-port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p)
8484
/**
8585
* Curie BSP implementation of jerry_port_get_current_time.
8686
*/
87-
double jerry_port_get_current_time ()
87+
double jerry_port_get_current_time (void)
8888
{
8989
uint32_t uptime_ms = get_uptime_ms ();
9090
uint32_t epoch_time = uptime_to_epoch (uptime_ms);

targets/default/jerry-port-default-date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p)
5050
/**
5151
* Default implementation of jerry_port_get_current_time.
5252
*/
53-
double jerry_port_get_current_time ()
53+
double jerry_port_get_current_time (void)
5454
{
5555
#ifdef __GNUC__
5656
struct timeval tv;

targets/default/jerry-port-default-fatal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void jerry_port_default_set_abort_on_fail (bool flag) /**< new value of 'abort o
3636
* @return true - if 'abort on fail' flag is set,
3737
* false - otherwise.
3838
*/
39-
bool jerry_port_default_is_abort_on_fail ()
39+
bool jerry_port_default_is_abort_on_fail (void)
4040
{
4141
return abort_on_fail;
4242
} /* jerry_port_default_is_abort_on_fail */

targets/mbed/source/port/jerry_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jerry_port_get_time_zone (jerry_time_zone_t *tz_p) /**< timezone pointer */
7979
* @return current timer's counter value in microseconds
8080
*/
8181
double
82-
jerry_port_get_current_time ()
82+
jerry_port_get_current_time (void)
8383
{
8484
return (double) us_ticker_read ();
8585
} /* jerry_port_get_current_time */

targets/mbedos5/source/jerry_port_mbed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jerry_port_get_time_zone (jerry_time_zone_t *tz_p) /**< timezone pointer */
9393
* @return current timer's counter value in microseconds
9494
*/
9595
double
96-
jerry_port_get_current_time ()
96+
jerry_port_get_current_time (void)
9797
{
9898
return (double) us_ticker_read ();
9999
} /* jerry_port_get_current_time */

targets/nuttx-stm32f4/jerry_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ jerry_port_get_time_zone (jerry_time_zone_t *tz_p)
304304
* @return 0
305305
*/
306306
double
307-
jerry_port_get_current_time ()
307+
jerry_port_get_current_time (void)
308308
{
309309
return 0;
310310
} /* jerry_port_get_current_time */

0 commit comments

Comments
 (0)