Fix warnings that would be generated by gcc -Wstrict-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5021 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6f41b7772d
commit
a5f1b965da
7
disas.c
7
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);
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
}
|
||||
|
@ -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;
|
||||
|
41
monitor.c
41
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);
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user