aboutsummaryrefslogtreecommitdiff
path: root/sim/rl78/gdb-if.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-04 22:56:31 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-04 23:05:02 -0400
commit5318ba65f8641ddc05e330c8545f9922cd3c48d6 (patch)
treef513fded4625cf7782aebc2b3e7aa14261b987b1 /sim/rl78/gdb-if.c
parentfa94b3a7c817a5e6615b24eeb3ac569b70af7e81 (diff)
downloadgdb-5318ba65f8641ddc05e330c8545f9922cd3c48d6.zip
gdb-5318ba65f8641ddc05e330c8545f9922cd3c48d6.tar.gz
gdb-5318ba65f8641ddc05e330c8545f9922cd3c48d6.tar.bz2
sim: rl78: clean up various warnings
A random grab bag of minor fixes to enable -Werror for this port. Fix local prototypes for a bunch of functions (e.g. adding static). Add missing includes for missing prototypes. Move local variable decls from the middle of functions to the top of the scope. Fix a logic error when processing commands where p was reassigned to cmd and then has its leading whitespace scanned a 2nd time. Handle short reads with fread().
Diffstat (limited to 'sim/rl78/gdb-if.c')
-rw-r--r--sim/rl78/gdb-if.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sim/rl78/gdb-if.c b/sim/rl78/gdb-if.c
index 5671791..7119214 100644
--- a/sim/rl78/gdb-if.c
+++ b/sim/rl78/gdb-if.c
@@ -403,7 +403,7 @@ int siggnal;
/* Given a signal number used by the rl78 bsp (that is, newlib),
return the corresponding signal numbers. */
-int
+static int
rl78_signal_to_target (int sig)
{
switch (sig)
@@ -442,7 +442,7 @@ rl78_signal_to_target (int sig)
/* Take a step return code RC and set up the variables consulted by
sim_stop_reason appropriately. */
-void
+static void
handle_step (int rc)
{
if (RL78_STEPPED (rc) || RL78_HIT_BREAK (rc))
@@ -549,11 +549,6 @@ sim_do_command (SIM_DESC sd, const char *cmd)
while (isspace (*p))
p++;
- /* Find the extent of the command word. */
- for (p = cmd; *p; p++)
- if (isspace (*p))
- break;
-
/* Null-terminate the command word, and record the start of any
further arguments. */
if (*p)