aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--disas.c7
-rw-r--r--hw/mips_malta.c2
-rw-r--r--hw/shix.c6
-rw-r--r--mips-dis.c4
-rw-r--r--monitor.c41
-rw-r--r--slirp/if.c6
-rw-r--r--target-alpha/translate.c2
-rw-r--r--target-sh4/translate.c2
8 files changed, 42 insertions, 28 deletions
diff --git a/disas.c b/disas.c
index b1192474c3..a8bc8adf2a 100644
--- a/disas.c
+++ b/disas.c
@@ -341,11 +341,8 @@ static int monitor_disas_is_physical;
static CPUState *monitor_disas_env;
static int
-monitor_read_memory (memaddr, myaddr, length, info)
- bfd_vma memaddr;
- bfd_byte *myaddr;
- int length;
- struct disassemble_info *info;
+monitor_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length,
+ struct disassemble_info *info)
{
if (monitor_disas_is_physical) {
cpu_physical_memory_rw(memaddr, myaddr, length, 0);
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index a64e225425..63af965d7c 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -155,7 +155,7 @@ static eeprom24c0x_t eeprom = {
},
};
-static uint8_t eeprom24c0x_read()
+static uint8_t eeprom24c0x_read(void)
{
logout("%u: scl = %u, sda = %u, data = 0x%02x\n",
eeprom.tick, eeprom.scl, eeprom.sda, eeprom.data);
diff --git a/hw/shix.c b/hw/shix.c
index eb75f0cb8c..ff8afece3c 100644
--- a/hw/shix.c
+++ b/hw/shix.c
@@ -45,17 +45,17 @@ void irq_info(void)
/* XXXXX */
}
-void pic_info()
+void pic_info(void)
{
/* XXXXX */
}
-void vga_update_display()
+void vga_update_display(void)
{
/* XXXXX */
}
-void vga_invalidate_display()
+void vga_invalidate_display(void)
{
/* XXXXX */
}
diff --git a/mips-dis.c b/mips-dis.c
index 7cf0793c4c..867ecf2528 100644
--- a/mips-dis.c
+++ b/mips-dis.c
@@ -3322,9 +3322,7 @@ set_default_mips_dis_options (struct disassemble_info *info)
}
void
-parse_mips_dis_option (option, len)
- const char *option;
- unsigned int len;
+parse_mips_dis_option (const char *option, unsigned int len)
{
unsigned int i, optionlen, vallen;
const char *val;
diff --git a/monitor.c b/monitor.c
index b76b1ddd34..23b527e0ea 100644
--- a/monitor.c
+++ b/monitor.c
@@ -61,7 +61,7 @@
typedef struct term_cmd_t {
const char *name;
const char *args_type;
- void (*handler)();
+ void *handler;
const char *params;
const char *help;
} term_cmd_t;
@@ -224,6 +224,7 @@ static void do_commit(const char *device)
static void do_info(const char *item)
{
term_cmd_t *cmd;
+ void (*handler)(void);
if (!item)
goto help;
@@ -235,7 +236,8 @@ static void do_info(const char *item)
help_cmd("info");
return;
found:
- cmd->handler();
+ handler = cmd->handler;
+ handler();
}
static void do_info_version(void)
@@ -2158,6 +2160,17 @@ static void monitor_handle_command(const char *cmdline)
char buf[1024];
void *str_allocated[MAX_ARGS];
void *args[MAX_ARGS];
+ void (*handler_0)(void);
+ void (*handler_1)(void *arg0);
+ void (*handler_2)(void *arg0, void *arg1);
+ void (*handler_3)(void *arg0, void *arg1, void *arg2);
+ void (*handler_4)(void *arg0, void *arg1, void *arg2, void *arg3);
+ void (*handler_5)(void *arg0, void *arg1, void *arg2, void *arg3,
+ void *arg4);
+ void (*handler_6)(void *arg0, void *arg1, void *arg2, void *arg3,
+ void *arg4, void *arg5);
+ void (*handler_7)(void *arg0, void *arg1, void *arg2, void *arg3,
+ void *arg4, void *arg5, void *arg6);
#ifdef DEBUG
term_printf("command='%s'\n", cmdline);
@@ -2420,28 +2433,36 @@ static void monitor_handle_command(const char *cmdline)
switch(nb_args) {
case 0:
- cmd->handler();
+ handler_0 = cmd->handler;
+ handler_0();
break;
case 1:
- cmd->handler(args[0]);
+ handler_1 = cmd->handler;
+ handler_1(args[0]);
break;
case 2:
- cmd->handler(args[0], args[1]);
+ handler_2 = cmd->handler;
+ handler_2(args[0], args[1]);
break;
case 3:
- cmd->handler(args[0], args[1], args[2]);
+ handler_3 = cmd->handler;
+ handler_3(args[0], args[1], args[2]);
break;
case 4:
- cmd->handler(args[0], args[1], args[2], args[3]);
+ handler_4 = cmd->handler;
+ handler_4(args[0], args[1], args[2], args[3]);
break;
case 5:
- cmd->handler(args[0], args[1], args[2], args[3], args[4]);
+ handler_5 = cmd->handler;
+ handler_5(args[0], args[1], args[2], args[3], args[4]);
break;
case 6:
- cmd->handler(args[0], args[1], args[2], args[3], args[4], args[5]);
+ handler_6 = cmd->handler;
+ handler_6(args[0], args[1], args[2], args[3], args[4], args[5]);
break;
case 7:
- cmd->handler(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ handler_7 = cmd->handler;
+ handler_7(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
break;
default:
term_printf("unsupported number of arguments: %d\n", nb_args);
diff --git a/slirp/if.c b/slirp/if.c
index 361d7f3640..31c2112354 100644
--- a/slirp/if.c
+++ b/slirp/if.c
@@ -16,8 +16,7 @@ struct mbuf *next_m; /* Pointer to next mbuf to output */
#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm))
void
-ifs_insque(ifm, ifmhead)
- struct mbuf *ifm, *ifmhead;
+ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead)
{
ifm->ifs_next = ifmhead->ifs_next;
ifmhead->ifs_next = ifm;
@@ -26,8 +25,7 @@ ifs_insque(ifm, ifmhead)
}
void
-ifs_remque(ifm)
- struct mbuf *ifm;
+ifs_remque(struct mbuf *ifm)
{
ifm->ifs_prev->ifs_next = ifm->ifs_next;
ifm->ifs_next->ifs_prev = ifm->ifs_prev;
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index be905bfbd0..d3c45007f3 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -47,7 +47,7 @@ static TCGv cpu_env;
#include "gen-icount.h"
-static void alpha_translate_init()
+static void alpha_translate_init(void)
{
static int done_init = 0;
if (done_init)
diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index a73805f64a..15500a6c73 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -60,7 +60,7 @@ static TCGv cpu_env;
#include "gen-icount.h"
-static void sh4_translate_init()
+static void sh4_translate_init(void)
{
static int done_init = 0;
if (done_init)