From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 03/11] sim/rx: fill in missing 'void' for empty argument lists
Date: Mon, 1 Feb 2021 11:44:06 +0000 [thread overview]
Message-ID: <ce4ff66457d40f112c5f5d61d3aee055ed2476da.1612179773.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1612179773.git.andrew.burgess@embecosm.com>
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/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.25.4
next prev parent reply other threads:[~2021-02-01 11:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 11:44 [PATCH 00/11] fix build warnings for rx simulator Andrew Burgess
2021-02-01 11:44 ` [PATCH 01/11] sim/rx: define sim_memory_map Andrew Burgess
2021-02-01 14:46 ` Mike Frysinger
2021-02-08 11:01 ` Andrew Burgess
2021-02-01 11:44 ` [PATCH 02/11] sim/rx: fix an issue where we try to modify a const string Andrew Burgess
2021-02-01 11:44 ` Andrew Burgess [this message]
2021-02-01 11:44 ` [PATCH 04/11] sim/rx: mark some functions as static Andrew Burgess
2021-02-01 11:44 ` [PATCH 05/11] sim/rx: delete an unused function Andrew Burgess
2021-02-01 11:44 ` [PATCH 06/11] sim/rx: use puts instead of printf in a few places Andrew Burgess
2021-02-01 14:49 ` Mike Frysinger
2021-02-08 10:58 ` Andrew Burgess
2021-02-01 11:44 ` [PATCH 07/11] sim/rx: move some variable declarations to the start of the block Andrew Burgess
2021-02-01 11:44 ` [PATCH 08/11] sim/rx: use PRIx64 in printf format string Andrew Burgess
2021-02-01 11:44 ` [PATCH 09/11] sim/rx: add some missing includes Andrew Burgess
2021-02-01 11:44 ` [PATCH 10/11] sim/rx: avoid pointer arithmetic on void * pointers Andrew Burgess
2021-02-01 11:44 ` [PATCH 11/11] sim/rx: enable build with warnings Andrew Burgess
2021-02-01 14:50 ` Mike Frysinger
2021-02-02 4:53 ` [PATCH] sim: erc32/m32c/rl78: add sim_memory_map stub for gdb Mike Frysinger
2021-02-08 10:57 ` [PATCH 11/11] sim/rx: enable build with warnings Andrew Burgess
2021-02-02 4:37 ` [PATCH 00/11] fix build warnings for rx simulator Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce4ff66457d40f112c5f5d61d3aee055ed2476da.1612179773.git.andrew.burgess@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).