From 1c3e93a41f88703818999ed492699de26b0748cd Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 28 Jan 2021 17:24:45 +0000 Subject: [PATCH] sim/rx: fill in missing 'void' for empty argument lists Ensure we have 'void' inside empty argument lists. This was causing several warnings for the rx simulator. sim/rx/ChangeLog: * cpu.h (trace_register_changes): Add void parameter type. * err.c (ee_overrides): Likewise. * mem.c (mem_usage_stats): Likewise. (e): Likewise. * reg.c (stack_heap_stats): Likewise. * rx.c (pop): Likewise. (poppc): Likewise. (decode_opcode): Likewise. * syscalls.c (arg): Likewise. --- sim/rx/ChangeLog | 12 ++++++++++++ sim/rx/cpu.h | 2 +- sim/rx/err.c | 2 +- sim/rx/mem.c | 4 ++-- sim/rx/reg.c | 2 +- sim/rx/rx.c | 6 +++--- sim/rx/syscalls.c | 2 +- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index 8d5f1d745e6..58b07eac531 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,15 @@ +2021-02-08 Andrew Burgess + + * cpu.h (trace_register_changes): Add void parameter type. + * err.c (ee_overrides): Likewise. + * mem.c (mem_usage_stats): Likewise. + (e): Likewise. + * reg.c (stack_heap_stats): Likewise. + * rx.c (pop): Likewise. + (poppc): Likewise. + (decode_opcode): Likewise. + * syscalls.c (arg): Likewise. + 2021-02-08 Andrew Burgess * gdb-if.c (sim_do_command): Work with a copy of the command. diff --git a/sim/rx/cpu.h b/sim/rx/cpu.h index 700f2de3c2b..ef4503cc720 100644 --- a/sim/rx/cpu.h +++ b/sim/rx/cpu.h @@ -240,6 +240,6 @@ extern void reset_pipeline_stats (void); extern void halt_pipeline_stats (void); extern void pipeline_stats (void); -extern void trace_register_changes (); +extern void trace_register_changes (void); extern void generate_access_exception (void); extern jmp_buf decode_jmp_buf; diff --git a/sim/rx/err.c b/sim/rx/err.c index 3fc64d1d685..ce1cd571f59 100644 --- a/sim/rx/err.c +++ b/sim/rx/err.c @@ -28,7 +28,7 @@ static unsigned char ee_actions[SIM_ERR_NUM_ERRORS]; static enum execution_error last_error; static void -ee_overrides () +ee_overrides (void) { /* GCC may initialize a bitfield by reading the uninitialized byte, masking in the bitfield, and writing the byte back out. */ diff --git a/sim/rx/mem.c b/sim/rx/mem.c index 40ab0bd5e6a..7fbf08e6415 100644 --- a/sim/rx/mem.c +++ b/sim/rx/mem.c @@ -161,7 +161,7 @@ mcs (int isput, int bytes) } void -mem_usage_stats () +mem_usage_stats (void) { int i, j; int rstart = 0; @@ -244,7 +244,7 @@ s (int address, char *dir) #define S(d) if (trace) s(address, d) static void -e () +e (void) { if (!trace) return; diff --git a/sim/rx/reg.c b/sim/rx/reg.c index c300f3ba6b2..00796a0c99a 100644 --- a/sim/rx/reg.c +++ b/sim/rx/reg.c @@ -149,7 +149,7 @@ get_reg64 (int id) static int highest_sp = 0, lowest_sp = 0xffffff; void -stack_heap_stats () +stack_heap_stats (void) { if (heapbottom < heaptop) printf ("heap: %08x - %08x (%d bytes)\n", heapbottom, heaptop, diff --git a/sim/rx/rx.c b/sim/rx/rx.c index beed6a14c81..e3737a56e98 100644 --- a/sim/rx/rx.c +++ b/sim/rx/rx.c @@ -682,7 +682,7 @@ pushpc(int val) } static int -pop() +pop (void) { int rv; int rsp = get_reg (sp); @@ -693,7 +693,7 @@ pop() } static int -poppc() +poppc (void) { int rv; int rsp = get_reg (sp); @@ -931,7 +931,7 @@ op_is_memory (const RX_Opcode_Decoded *rd, int i) #define DO_RETURN(x) { longjmp (decode_jmp_buf, x); } int -decode_opcode () +decode_opcode (void) { unsigned int uma=0, umb=0; int ma=0, mb=0; diff --git a/sim/rx/syscalls.c b/sim/rx/syscalls.c index 1a6f65fad16..2f89da17330 100644 --- a/sim/rx/syscalls.c +++ b/sim/rx/syscalls.c @@ -69,7 +69,7 @@ get_callbacks (void) int argp, stackp; static int -arg () +arg (void) { int rv = 0; argp++; -- 2.39.5