aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c/srcdest.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-01 02:21:21 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-01 02:22:58 -0400
commit269e9c185f67d477a99574f53ead904d50fddfda (patch)
tree0177a3d3718cc79c55ae0ff07d9d4d974397800d /sim/m32c/srcdest.c
parent0fe84f3fbe9a740c38a8dbaa0150b8e4c25c69dd (diff)
downloadgdb-269e9c185f67d477a99574f53ead904d50fddfda.zip
gdb-269e9c185f67d477a99574f53ead904d50fddfda.tar.gz
gdb-269e9c185f67d477a99574f53ead904d50fddfda.tar.bz2
sim: m32c: enable warnings & clean up a bunch
This doesn't clean up all the warnings, just most of them. The ones that are left will require some care to unravel.
Diffstat (limited to 'sim/m32c/srcdest.c')
-rw-r--r--sim/m32c/srcdest.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sim/m32c/srcdest.c b/sim/m32c/srcdest.c
index a2415a8..ada2a9b 100644
--- a/sim/m32c/srcdest.c
+++ b/sim/m32c/srcdest.c
@@ -31,7 +31,7 @@ static int src_addend = 0;
static int dest_addend = 0;
static int
-disp8 ()
+disp8 (void)
{
int rv;
int tsave = trace;
@@ -45,7 +45,7 @@ disp8 ()
}
static int
-disp16 ()
+disp16 (void)
{
int rv;
int tsave = trace;
@@ -59,7 +59,7 @@ disp16 ()
}
static int
-disp24 ()
+disp24 (void)
{
int rv;
int tsave = trace;
@@ -73,7 +73,7 @@ disp24 ()
}
static int
-disp20 ()
+disp20 (void)
{
return disp24 () & 0x000fffff;
}
@@ -117,8 +117,6 @@ srcdest
decode_srcdest4 (int destcode, int bw)
{
srcdest sd;
- sd.bytes = bw ? 2 : 1;
- sd.mem = (destcode >= 6) ? 1 : 0;
static const char *dc_wnames[16] = { "r0", "r1", "r2", "r3",
"a0", "a1", "[a0]", "[a1]",
"disp8[a0]", "disp8[a1]", "disp8[sb]", "disp8[fb]",
@@ -126,6 +124,9 @@ decode_srcdest4 (int destcode, int bw)
};
static const char *dc_bnames[4] = { "r0l", "r0h", "r1l", "r1h" };;
+ sd.bytes = bw ? 2 : 1;
+ sd.mem = (destcode >= 6) ? 1 : 0;
+
if (trace)
{
const char *n = dc_wnames[destcode];
@@ -199,8 +200,6 @@ srcdest
decode_jumpdest (int destcode, int w)
{
srcdest sd;
- sd.bytes = w ? 2 : 3;
- sd.mem = (destcode >= 6) ? 1 : 0;
static const char *dc_wnames[16] = { "r0", "r1", "r2", "r3",
"a0", "a1", "[a0]", "[a1]",
"disp8[a0]", "disp8[a1]", "disp8[sb]", "disp8[fb]",
@@ -208,6 +207,9 @@ decode_jumpdest (int destcode, int w)
};
static const char *dc_anames[4] = { "r0l", "r0h", "r1l", "r1h" };
+ sd.bytes = w ? 2 : 3;
+ sd.mem = (destcode >= 6) ? 1 : 0;
+
if (trace)
{
const char *n = dc_wnames[destcode];