Commit a5f1b965dae70f7d41721edaacb109d80721b966
1 parent
6f41b777
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
Showing
8 changed files
with
42 additions
and
28 deletions
disas.c
| @@ -341,11 +341,8 @@ static int monitor_disas_is_physical; | @@ -341,11 +341,8 @@ static int monitor_disas_is_physical; | ||
| 341 | static CPUState *monitor_disas_env; | 341 | static CPUState *monitor_disas_env; |
| 342 | 342 | ||
| 343 | static int | 343 | static int |
| 344 | -monitor_read_memory (memaddr, myaddr, length, info) | ||
| 345 | - bfd_vma memaddr; | ||
| 346 | - bfd_byte *myaddr; | ||
| 347 | - int length; | ||
| 348 | - struct disassemble_info *info; | 344 | +monitor_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length, |
| 345 | + struct disassemble_info *info) | ||
| 349 | { | 346 | { |
| 350 | if (monitor_disas_is_physical) { | 347 | if (monitor_disas_is_physical) { |
| 351 | cpu_physical_memory_rw(memaddr, myaddr, length, 0); | 348 | cpu_physical_memory_rw(memaddr, myaddr, length, 0); |
hw/mips_malta.c
| @@ -155,7 +155,7 @@ static eeprom24c0x_t eeprom = { | @@ -155,7 +155,7 @@ static eeprom24c0x_t eeprom = { | ||
| 155 | }, | 155 | }, |
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| 158 | -static uint8_t eeprom24c0x_read() | 158 | +static uint8_t eeprom24c0x_read(void) |
| 159 | { | 159 | { |
| 160 | logout("%u: scl = %u, sda = %u, data = 0x%02x\n", | 160 | logout("%u: scl = %u, sda = %u, data = 0x%02x\n", |
| 161 | eeprom.tick, eeprom.scl, eeprom.sda, eeprom.data); | 161 | eeprom.tick, eeprom.scl, eeprom.sda, eeprom.data); |
hw/shix.c
| @@ -45,17 +45,17 @@ void irq_info(void) | @@ -45,17 +45,17 @@ void irq_info(void) | ||
| 45 | /* XXXXX */ | 45 | /* XXXXX */ |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | -void pic_info() | 48 | +void pic_info(void) |
| 49 | { | 49 | { |
| 50 | /* XXXXX */ | 50 | /* XXXXX */ |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | -void vga_update_display() | 53 | +void vga_update_display(void) |
| 54 | { | 54 | { |
| 55 | /* XXXXX */ | 55 | /* XXXXX */ |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | -void vga_invalidate_display() | 58 | +void vga_invalidate_display(void) |
| 59 | { | 59 | { |
| 60 | /* XXXXX */ | 60 | /* XXXXX */ |
| 61 | } | 61 | } |
mips-dis.c
| @@ -3322,9 +3322,7 @@ set_default_mips_dis_options (struct disassemble_info *info) | @@ -3322,9 +3322,7 @@ set_default_mips_dis_options (struct disassemble_info *info) | ||
| 3322 | } | 3322 | } |
| 3323 | 3323 | ||
| 3324 | void | 3324 | void |
| 3325 | -parse_mips_dis_option (option, len) | ||
| 3326 | - const char *option; | ||
| 3327 | - unsigned int len; | 3325 | +parse_mips_dis_option (const char *option, unsigned int len) |
| 3328 | { | 3326 | { |
| 3329 | unsigned int i, optionlen, vallen; | 3327 | unsigned int i, optionlen, vallen; |
| 3330 | const char *val; | 3328 | const char *val; |
monitor.c
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | typedef struct term_cmd_t { | 61 | typedef struct term_cmd_t { |
| 62 | const char *name; | 62 | const char *name; |
| 63 | const char *args_type; | 63 | const char *args_type; |
| 64 | - void (*handler)(); | 64 | + void *handler; |
| 65 | const char *params; | 65 | const char *params; |
| 66 | const char *help; | 66 | const char *help; |
| 67 | } term_cmd_t; | 67 | } term_cmd_t; |
| @@ -224,6 +224,7 @@ static void do_commit(const char *device) | @@ -224,6 +224,7 @@ static void do_commit(const char *device) | ||
| 224 | static void do_info(const char *item) | 224 | static void do_info(const char *item) |
| 225 | { | 225 | { |
| 226 | term_cmd_t *cmd; | 226 | term_cmd_t *cmd; |
| 227 | + void (*handler)(void); | ||
| 227 | 228 | ||
| 228 | if (!item) | 229 | if (!item) |
| 229 | goto help; | 230 | goto help; |
| @@ -235,7 +236,8 @@ static void do_info(const char *item) | @@ -235,7 +236,8 @@ static void do_info(const char *item) | ||
| 235 | help_cmd("info"); | 236 | help_cmd("info"); |
| 236 | return; | 237 | return; |
| 237 | found: | 238 | found: |
| 238 | - cmd->handler(); | 239 | + handler = cmd->handler; |
| 240 | + handler(); | ||
| 239 | } | 241 | } |
| 240 | 242 | ||
| 241 | static void do_info_version(void) | 243 | static void do_info_version(void) |
| @@ -2158,6 +2160,17 @@ static void monitor_handle_command(const char *cmdline) | @@ -2158,6 +2160,17 @@ static void monitor_handle_command(const char *cmdline) | ||
| 2158 | char buf[1024]; | 2160 | char buf[1024]; |
| 2159 | void *str_allocated[MAX_ARGS]; | 2161 | void *str_allocated[MAX_ARGS]; |
| 2160 | void *args[MAX_ARGS]; | 2162 | void *args[MAX_ARGS]; |
| 2163 | + void (*handler_0)(void); | ||
| 2164 | + void (*handler_1)(void *arg0); | ||
| 2165 | + void (*handler_2)(void *arg0, void *arg1); | ||
| 2166 | + void (*handler_3)(void *arg0, void *arg1, void *arg2); | ||
| 2167 | + void (*handler_4)(void *arg0, void *arg1, void *arg2, void *arg3); | ||
| 2168 | + void (*handler_5)(void *arg0, void *arg1, void *arg2, void *arg3, | ||
| 2169 | + void *arg4); | ||
| 2170 | + void (*handler_6)(void *arg0, void *arg1, void *arg2, void *arg3, | ||
| 2171 | + void *arg4, void *arg5); | ||
| 2172 | + void (*handler_7)(void *arg0, void *arg1, void *arg2, void *arg3, | ||
| 2173 | + void *arg4, void *arg5, void *arg6); | ||
| 2161 | 2174 | ||
| 2162 | #ifdef DEBUG | 2175 | #ifdef DEBUG |
| 2163 | term_printf("command='%s'\n", cmdline); | 2176 | term_printf("command='%s'\n", cmdline); |
| @@ -2420,28 +2433,36 @@ static void monitor_handle_command(const char *cmdline) | @@ -2420,28 +2433,36 @@ static void monitor_handle_command(const char *cmdline) | ||
| 2420 | 2433 | ||
| 2421 | switch(nb_args) { | 2434 | switch(nb_args) { |
| 2422 | case 0: | 2435 | case 0: |
| 2423 | - cmd->handler(); | 2436 | + handler_0 = cmd->handler; |
| 2437 | + handler_0(); | ||
| 2424 | break; | 2438 | break; |
| 2425 | case 1: | 2439 | case 1: |
| 2426 | - cmd->handler(args[0]); | 2440 | + handler_1 = cmd->handler; |
| 2441 | + handler_1(args[0]); | ||
| 2427 | break; | 2442 | break; |
| 2428 | case 2: | 2443 | case 2: |
| 2429 | - cmd->handler(args[0], args[1]); | 2444 | + handler_2 = cmd->handler; |
| 2445 | + handler_2(args[0], args[1]); | ||
| 2430 | break; | 2446 | break; |
| 2431 | case 3: | 2447 | case 3: |
| 2432 | - cmd->handler(args[0], args[1], args[2]); | 2448 | + handler_3 = cmd->handler; |
| 2449 | + handler_3(args[0], args[1], args[2]); | ||
| 2433 | break; | 2450 | break; |
| 2434 | case 4: | 2451 | case 4: |
| 2435 | - cmd->handler(args[0], args[1], args[2], args[3]); | 2452 | + handler_4 = cmd->handler; |
| 2453 | + handler_4(args[0], args[1], args[2], args[3]); | ||
| 2436 | break; | 2454 | break; |
| 2437 | case 5: | 2455 | case 5: |
| 2438 | - cmd->handler(args[0], args[1], args[2], args[3], args[4]); | 2456 | + handler_5 = cmd->handler; |
| 2457 | + handler_5(args[0], args[1], args[2], args[3], args[4]); | ||
| 2439 | break; | 2458 | break; |
| 2440 | case 6: | 2459 | case 6: |
| 2441 | - cmd->handler(args[0], args[1], args[2], args[3], args[4], args[5]); | 2460 | + handler_6 = cmd->handler; |
| 2461 | + handler_6(args[0], args[1], args[2], args[3], args[4], args[5]); | ||
| 2442 | break; | 2462 | break; |
| 2443 | case 7: | 2463 | case 7: |
| 2444 | - cmd->handler(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); | 2464 | + handler_7 = cmd->handler; |
| 2465 | + handler_7(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); | ||
| 2445 | break; | 2466 | break; |
| 2446 | default: | 2467 | default: |
| 2447 | term_printf("unsupported number of arguments: %d\n", nb_args); | 2468 | term_printf("unsupported number of arguments: %d\n", nb_args); |
slirp/if.c
| @@ -16,8 +16,7 @@ struct mbuf *next_m; /* Pointer to next mbuf to output */ | @@ -16,8 +16,7 @@ struct mbuf *next_m; /* Pointer to next mbuf to output */ | ||
| 16 | #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) | 16 | #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) |
| 17 | 17 | ||
| 18 | void | 18 | void |
| 19 | -ifs_insque(ifm, ifmhead) | ||
| 20 | - struct mbuf *ifm, *ifmhead; | 19 | +ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead) |
| 21 | { | 20 | { |
| 22 | ifm->ifs_next = ifmhead->ifs_next; | 21 | ifm->ifs_next = ifmhead->ifs_next; |
| 23 | ifmhead->ifs_next = ifm; | 22 | ifmhead->ifs_next = ifm; |
| @@ -26,8 +25,7 @@ ifs_insque(ifm, ifmhead) | @@ -26,8 +25,7 @@ ifs_insque(ifm, ifmhead) | ||
| 26 | } | 25 | } |
| 27 | 26 | ||
| 28 | void | 27 | void |
| 29 | -ifs_remque(ifm) | ||
| 30 | - struct mbuf *ifm; | 28 | +ifs_remque(struct mbuf *ifm) |
| 31 | { | 29 | { |
| 32 | ifm->ifs_prev->ifs_next = ifm->ifs_next; | 30 | ifm->ifs_prev->ifs_next = ifm->ifs_next; |
| 33 | ifm->ifs_next->ifs_prev = ifm->ifs_prev; | 31 | ifm->ifs_next->ifs_prev = ifm->ifs_prev; |
target-alpha/translate.c
| @@ -47,7 +47,7 @@ static TCGv cpu_env; | @@ -47,7 +47,7 @@ static TCGv cpu_env; | ||
| 47 | 47 | ||
| 48 | #include "gen-icount.h" | 48 | #include "gen-icount.h" |
| 49 | 49 | ||
| 50 | -static void alpha_translate_init() | 50 | +static void alpha_translate_init(void) |
| 51 | { | 51 | { |
| 52 | static int done_init = 0; | 52 | static int done_init = 0; |
| 53 | if (done_init) | 53 | if (done_init) |
target-sh4/translate.c
| @@ -60,7 +60,7 @@ static TCGv cpu_env; | @@ -60,7 +60,7 @@ static TCGv cpu_env; | ||
| 60 | 60 | ||
| 61 | #include "gen-icount.h" | 61 | #include "gen-icount.h" |
| 62 | 62 | ||
| 63 | -static void sh4_translate_init() | 63 | +static void sh4_translate_init(void) |
| 64 | { | 64 | { |
| 65 | static int done_init = 0; | 65 | static int done_init = 0; |
| 66 | if (done_init) | 66 | if (done_init) |