mirror of https://github.com/xqemu/xqemu.git
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 CPUState *monitor_disas_env;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
monitor_read_memory (memaddr, myaddr, length, info)
|
monitor_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length,
|
||||||
bfd_vma memaddr;
|
struct disassemble_info *info)
|
||||||
bfd_byte *myaddr;
|
|
||||||
int length;
|
|
||||||
struct disassemble_info *info;
|
|
||||||
{
|
{
|
||||||
if (monitor_disas_is_physical) {
|
if (monitor_disas_is_physical) {
|
||||||
cpu_physical_memory_rw(memaddr, myaddr, length, 0);
|
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",
|
logout("%u: scl = %u, sda = %u, data = 0x%02x\n",
|
||||||
eeprom.tick, eeprom.scl, eeprom.sda, eeprom.data);
|
eeprom.tick, eeprom.scl, eeprom.sda, eeprom.data);
|
||||||
|
|
|
@ -45,17 +45,17 @@ void irq_info(void)
|
||||||
/* XXXXX */
|
/* XXXXX */
|
||||||
}
|
}
|
||||||
|
|
||||||
void pic_info()
|
void pic_info(void)
|
||||||
{
|
{
|
||||||
/* XXXXX */
|
/* XXXXX */
|
||||||
}
|
}
|
||||||
|
|
||||||
void vga_update_display()
|
void vga_update_display(void)
|
||||||
{
|
{
|
||||||
/* XXXXX */
|
/* XXXXX */
|
||||||
}
|
}
|
||||||
|
|
||||||
void vga_invalidate_display()
|
void vga_invalidate_display(void)
|
||||||
{
|
{
|
||||||
/* XXXXX */
|
/* XXXXX */
|
||||||
}
|
}
|
||||||
|
|
|
@ -3322,9 +3322,7 @@ set_default_mips_dis_options (struct disassemble_info *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
parse_mips_dis_option (option, len)
|
parse_mips_dis_option (const char *option, unsigned int len)
|
||||||
const char *option;
|
|
||||||
unsigned int len;
|
|
||||||
{
|
{
|
||||||
unsigned int i, optionlen, vallen;
|
unsigned int i, optionlen, vallen;
|
||||||
const char *val;
|
const char *val;
|
||||||
|
|
41
monitor.c
41
monitor.c
|
@ -61,7 +61,7 @@
|
||||||
typedef struct term_cmd_t {
|
typedef struct term_cmd_t {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *args_type;
|
const char *args_type;
|
||||||
void (*handler)();
|
void *handler;
|
||||||
const char *params;
|
const char *params;
|
||||||
const char *help;
|
const char *help;
|
||||||
} term_cmd_t;
|
} term_cmd_t;
|
||||||
|
@ -224,6 +224,7 @@ static void do_commit(const char *device)
|
||||||
static void do_info(const char *item)
|
static void do_info(const char *item)
|
||||||
{
|
{
|
||||||
term_cmd_t *cmd;
|
term_cmd_t *cmd;
|
||||||
|
void (*handler)(void);
|
||||||
|
|
||||||
if (!item)
|
if (!item)
|
||||||
goto help;
|
goto help;
|
||||||
|
@ -235,7 +236,8 @@ static void do_info(const char *item)
|
||||||
help_cmd("info");
|
help_cmd("info");
|
||||||
return;
|
return;
|
||||||
found:
|
found:
|
||||||
cmd->handler();
|
handler = cmd->handler;
|
||||||
|
handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_info_version(void)
|
static void do_info_version(void)
|
||||||
|
@ -2158,6 +2160,17 @@ static void monitor_handle_command(const char *cmdline)
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
void *str_allocated[MAX_ARGS];
|
void *str_allocated[MAX_ARGS];
|
||||||
void *args[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
|
#ifdef DEBUG
|
||||||
term_printf("command='%s'\n", cmdline);
|
term_printf("command='%s'\n", cmdline);
|
||||||
|
@ -2420,28 +2433,36 @@ static void monitor_handle_command(const char *cmdline)
|
||||||
|
|
||||||
switch(nb_args) {
|
switch(nb_args) {
|
||||||
case 0:
|
case 0:
|
||||||
cmd->handler();
|
handler_0 = cmd->handler;
|
||||||
|
handler_0();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
cmd->handler(args[0]);
|
handler_1 = cmd->handler;
|
||||||
|
handler_1(args[0]);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
cmd->handler(args[0], args[1]);
|
handler_2 = cmd->handler;
|
||||||
|
handler_2(args[0], args[1]);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
cmd->handler(args[0], args[1], args[2]);
|
handler_3 = cmd->handler;
|
||||||
|
handler_3(args[0], args[1], args[2]);
|
||||||
break;
|
break;
|
||||||
case 4:
|
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;
|
break;
|
||||||
case 5:
|
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;
|
break;
|
||||||
case 6:
|
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;
|
break;
|
||||||
case 7:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
term_printf("unsupported number of arguments: %d\n", nb_args);
|
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))
|
#define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm))
|
||||||
|
|
||||||
void
|
void
|
||||||
ifs_insque(ifm, ifmhead)
|
ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead)
|
||||||
struct mbuf *ifm, *ifmhead;
|
|
||||||
{
|
{
|
||||||
ifm->ifs_next = ifmhead->ifs_next;
|
ifm->ifs_next = ifmhead->ifs_next;
|
||||||
ifmhead->ifs_next = ifm;
|
ifmhead->ifs_next = ifm;
|
||||||
|
@ -26,8 +25,7 @@ ifs_insque(ifm, ifmhead)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ifs_remque(ifm)
|
ifs_remque(struct mbuf *ifm)
|
||||||
struct mbuf *ifm;
|
|
||||||
{
|
{
|
||||||
ifm->ifs_prev->ifs_next = ifm->ifs_next;
|
ifm->ifs_prev->ifs_next = ifm->ifs_next;
|
||||||
ifm->ifs_next->ifs_prev = ifm->ifs_prev;
|
ifm->ifs_next->ifs_prev = ifm->ifs_prev;
|
||||||
|
|
|
@ -47,7 +47,7 @@ static TCGv cpu_env;
|
||||||
|
|
||||||
#include "gen-icount.h"
|
#include "gen-icount.h"
|
||||||
|
|
||||||
static void alpha_translate_init()
|
static void alpha_translate_init(void)
|
||||||
{
|
{
|
||||||
static int done_init = 0;
|
static int done_init = 0;
|
||||||
if (done_init)
|
if (done_init)
|
||||||
|
|
|
@ -60,7 +60,7 @@ static TCGv cpu_env;
|
||||||
|
|
||||||
#include "gen-icount.h"
|
#include "gen-icount.h"
|
||||||
|
|
||||||
static void sh4_translate_init()
|
static void sh4_translate_init(void)
|
||||||
{
|
{
|
||||||
static int done_init = 0;
|
static int done_init = 0;
|
||||||
if (done_init)
|
if (done_init)
|
||||||
|
|
Loading…
Reference in New Issue