From b260d024145f6faa90dde499182181dfa007f845 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Wed, 28 May 2025 16:45:48 +0200 Subject: [PATCH] fix mismatching function prototypes --- src/disc.c | 2 +- src/disc.h | 6 +++--- src/disc_fdi.c | 2 +- src/disc_fdi.h | 2 +- src/fdc.c | 16 ++++++++-------- src/ide.c | 4 ++-- src/keyboard.c | 2 +- src/keyboard.h | 2 +- src/keyboard_amstrad.c | 2 +- src/keyboard_amstrad.h | 2 +- src/keyboard_at.c | 2 +- src/keyboard_at.h | 2 +- src/keyboard_olim24.c | 2 +- src/keyboard_olim24.h | 2 +- src/keyboard_pcjr.c | 2 +- src/keyboard_pcjr.h | 2 +- src/keyboard_xt.c | 2 +- src/keyboard_xt.h | 2 +- src/pit.h | 2 +- src/scsi_53c400.c | 2 +- src/scsi_aha1540.c | 4 ++-- src/sound.c | 2 +- src/sound.h | 2 +- src/sound_adlibgold.c | 2 +- src/vid_s3.c | 2 +- 25 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/disc.c b/src/disc.c index f2d9d554..1adb9132 100644 --- a/src/disc.c +++ b/src/disc.c @@ -185,7 +185,7 @@ int disc_hole(int drive) } } -void disc_poll() +void disc_poll(void*) { timer_advance_u64(&disc_poll_timer, disc_period * TIMER_USEC); diff --git a/src/disc.h b/src/disc.h index f45ad67a..83057b53 100644 --- a/src/disc.h +++ b/src/disc.h @@ -6,7 +6,7 @@ typedef struct void (*readaddress)(int drive, int track, int side, int density); void (*format)(int drive, int track, int side, int density, uint8_t fill); int (*hole)(int drive); - void (*stop)(); + void (*stop)(int drive); void (*poll)(); } DRIVE; @@ -19,7 +19,7 @@ void disc_new(int drive, char *fn); void disc_close(int drive); void disc_init(); void disc_reset(); -void disc_poll(); +void disc_poll(void*); void disc_seek(int drive, int track); void disc_readsector(int drive, int sector, int track, int side, int density, int sector_size); void disc_writesector(int drive, int sector, int track, int side, int density, int sector_size); @@ -33,7 +33,7 @@ void disc_set_drivesel(int drive); void disc_set_motor_enable(int motor_enable); extern int disc_drivesel; -void fdc_callback(); +void fdc_callback(void*); int fdc_data(uint8_t dat); void fdc_spindown(); void fdc_finishread(); diff --git a/src/disc_fdi.c b/src/disc_fdi.c index 1393bc29..04495760 100644 --- a/src/disc_fdi.c +++ b/src/disc_fdi.c @@ -260,7 +260,7 @@ static uint8_t decodefm(uint16_t dat) return temp; } -void fdi_stop() +void fdi_stop(int) { // pclog("fdi_stop\n"); fdi_inread = fdi_inwrite = fdi_inreadaddr = 0; diff --git a/src/disc_fdi.h b/src/disc_fdi.h index b28532db..3edff5b0 100644 --- a/src/disc_fdi.h +++ b/src/disc_fdi.h @@ -7,5 +7,5 @@ void fdi_writesector(int drive, int sector, int track, int side, int density, in void fdi_readaddress(int drive, int sector, int side, int density); void fdi_format(int drive, int sector, int side, int density, uint8_t fill); int fdi_hole(int drive); -void fdi_stop(); +void fdi_stop(int drive); void fdi_poll(); diff --git a/src/fdc.c b/src/fdc.c index e818c93f..530ff003 100644 --- a/src/fdc.c +++ b/src/fdc.c @@ -80,7 +80,7 @@ typedef struct FDC static FDC fdc; -void fdc_callback(); +void fdc_callback(void*); //#define SECTORS 9 int lastbyte=0; uint8_t disc_3f7; @@ -467,7 +467,7 @@ void fdc_write(uint16_t addr, uint8_t val, void *priv) // fdc.stat = 0x10 | (fdc.stat & 0xf); discint = 8; fdc.pos = 0; - fdc_callback(); + fdc_callback(NULL); } else { @@ -498,13 +498,13 @@ void fdc_write(uint16_t addr, uint8_t val, void *priv) fdc.lastdrive = fdc.drive; discint = 0x0e; fdc.pos = 0; - fdc_callback(); + fdc_callback(NULL); break; case 0x10: /*Get version*/ fdc.lastdrive = fdc.drive; discint = 0x10; fdc.pos = 0; - fdc_callback(); + fdc_callback(NULL); break; case 0x12: /*Set perpendicular mode*/ fdc.pnum=0; @@ -523,7 +523,7 @@ void fdc_write(uint16_t addr, uint8_t val, void *priv) fdc.lastdrive = fdc.drive; discint = fdc.command; fdc.pos = 0; - fdc_callback(); + fdc_callback(NULL); break; case 0x18: @@ -531,10 +531,10 @@ void fdc_write(uint16_t addr, uint8_t val, void *priv) fdc.lastdrive = fdc.drive; discint = 0x10; fdc.pos = 0; - fdc_callback(); + fdc_callback(NULL); /* fdc.stat = 0x10; discint = 0xfc; - fdc_callback(); */ + fdc_callback(NULL); */ break; default: @@ -798,7 +798,7 @@ uint8_t fdc_read(uint16_t addr, void *priv) return temp; } -void fdc_callback() +void fdc_callback(void*) { int temp; int drive; diff --git a/src/ide.c b/src/ide.c index 86a3619d..2eaaa55d 100644 --- a/src/ide.c +++ b/src/ide.c @@ -1174,12 +1174,12 @@ void callbackide(int ide_board) ide_irq_raise(ide); } -void ide_callback_pri() +void ide_callback_pri(void*) { callbackide(0); } -void ide_callback_sec() +void ide_callback_sec(void*) { callbackide(1); } diff --git a/src/keyboard.c b/src/keyboard.c index f41d59fe..b122dce7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -385,7 +385,7 @@ static uint8_t oldkey[272]; static uint8_t keydelay[272]; void (*keyboard_send)(uint8_t val); -void (*keyboard_poll)(); +void (*keyboard_poll)(void*); int keyboard_scan = 1; static scancode *at_scancodes; diff --git a/src/keyboard.h b/src/keyboard.h index c4a63e06..806399ee 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -1,5 +1,5 @@ extern void (*keyboard_send)(uint8_t val); -extern void (*keyboard_poll)(); +extern void (*keyboard_poll)(void*); void keyboard_process(); extern int keyboard_scan; diff --git a/src/keyboard_amstrad.c b/src/keyboard_amstrad.c index 31b0eb44..2e064859 100644 --- a/src/keyboard_amstrad.c +++ b/src/keyboard_amstrad.c @@ -35,7 +35,7 @@ static int key_queue_start = 0, key_queue_end = 0; static uint8_t amstrad_systemstat_1, amstrad_systemstat_2; -void keyboard_amstrad_poll() +void keyboard_amstrad_poll(void*) { timer_advance_u64(&keyboard_amstrad.send_delay_timer, (1000 * TIMER_USEC)); if (keyboard_amstrad.wantirq) diff --git a/src/keyboard_amstrad.h b/src/keyboard_amstrad.h index 76dd075d..5c6f5e70 100644 --- a/src/keyboard_amstrad.h +++ b/src/keyboard_amstrad.h @@ -1,3 +1,3 @@ void keyboard_amstrad_init(); void keyboard_amstrad_reset(); -void keyboard_amstrad_poll(); +void keyboard_amstrad_poll(void*); diff --git a/src/keyboard_at.c b/src/keyboard_at.c index 44cb3ec4..71d9d5a2 100644 --- a/src/keyboard_at.c +++ b/src/keyboard_at.c @@ -95,7 +95,7 @@ int mouse_queue_start = 0, mouse_queue_end = 0; void keyboard_at_adddata_keyboard(uint8_t val); -void keyboard_at_poll() +void keyboard_at_poll(void*) { timer_advance_u64(&keyboard_at.send_delay_timer, (100 * TIMER_USEC)); diff --git a/src/keyboard_at.h b/src/keyboard_at.h index 5dc00fa8..bbf6afee 100644 --- a/src/keyboard_at.h +++ b/src/keyboard_at.h @@ -1,7 +1,7 @@ void keyboard_at_init(); void keyboard_at_init_ps2(); void keyboard_at_reset(); -void keyboard_at_poll(); +void keyboard_at_poll(void*); void keyboard_at_set_mouse(void (*mouse_write)(uint8_t val, void *p), void *p); void keyboard_at_adddata_mouse(uint8_t val); diff --git a/src/keyboard_olim24.c b/src/keyboard_olim24.c index a34d8307..d7be0b86 100644 --- a/src/keyboard_olim24.c +++ b/src/keyboard_olim24.c @@ -43,7 +43,7 @@ static int key_queue_start = 0, key_queue_end = 0; static uint8_t mouse_scancodes[7]; -void keyboard_olim24_poll() +void keyboard_olim24_poll(void*) { timer_advance_u64(&keyboard_olim24.send_delay_timer, (1000 * TIMER_USEC)); //pclog("poll %i\n", keyboard_olim24.wantirq); diff --git a/src/keyboard_olim24.h b/src/keyboard_olim24.h index dea40f95..4e13ecca 100644 --- a/src/keyboard_olim24.h +++ b/src/keyboard_olim24.h @@ -1,5 +1,5 @@ void keyboard_olim24_init(); void keyboard_olim24_reset(); -void keyboard_olim24_poll(); +void keyboard_olim24_poll(void*); extern mouse_t mouse_olim24; diff --git a/src/keyboard_pcjr.c b/src/keyboard_pcjr.c index 65198976..ff9376d3 100644 --- a/src/keyboard_pcjr.c +++ b/src/keyboard_pcjr.c @@ -41,7 +41,7 @@ struct static uint8_t key_queue[16]; static int key_queue_start = 0, key_queue_end = 0; -void keyboard_pcjr_poll() +void keyboard_pcjr_poll(void*) { timer_advance_u64(&keyboard_pcjr.send_delay_timer, (220 * TIMER_USEC)); diff --git a/src/keyboard_pcjr.h b/src/keyboard_pcjr.h index 46520926..b398e1f8 100644 --- a/src/keyboard_pcjr.h +++ b/src/keyboard_pcjr.h @@ -1,3 +1,3 @@ void keyboard_pcjr_init(); void keyboard_pcjr_reset(); -void keyboard_pcjr_poll(); +void keyboard_pcjr_poll(void*); diff --git a/src/keyboard_xt.c b/src/keyboard_xt.c index 7f5c7943..4f567695 100644 --- a/src/keyboard_xt.c +++ b/src/keyboard_xt.c @@ -44,7 +44,7 @@ struct static uint8_t key_queue[16]; static int key_queue_start = 0, key_queue_end = 0; -void keyboard_xt_poll() +void keyboard_xt_poll(void*) { timer_advance_u64(&keyboard_xt.send_delay_timer, (1000 * TIMER_USEC)); if (!(keyboard_xt.pb & 0x40) && romset != ROM_TANDY) diff --git a/src/keyboard_xt.h b/src/keyboard_xt.h index 14f4faab..f8a703ad 100644 --- a/src/keyboard_xt.h +++ b/src/keyboard_xt.h @@ -1,4 +1,4 @@ void keyboard_xt_init(); void keyboard_tandy_init(); void keyboard_xt_reset(); -void keyboard_xt_poll(); +void keyboard_xt_poll(void*); diff --git a/src/pit.h b/src/pit.h index b314a932..cc2dd01d 100644 --- a/src/pit.h +++ b/src/pit.h @@ -1,7 +1,7 @@ extern uint64_t PITCONST; void pit_init(); void pit_ps2_init(); -void pit_reset(); +void pit_reset(PIT *pit); void pit_set_gate(PIT *pit, int channel, int gate); void pit_set_using_timer(PIT *pit, int t, int using_timer); void pit_set_out_func(PIT *pit, int t, void (*func)(int new_out, int old_out)); diff --git a/src/scsi_53c400.c b/src/scsi_53c400.c index 03629eb5..dc73bce9 100644 --- a/src/scsi_53c400.c +++ b/src/scsi_53c400.c @@ -740,7 +740,7 @@ static void *scsi_rt1000b_init() return scsi_53c400_init("Rancho_RT1000_RTBios_version_8.10R.bin"); } -static void *scsi_t130b_init(char *bios_fn) +static void *scsi_t130b_init() { lcs6821n_t *scsi = malloc(sizeof(lcs6821n_t)); memset(scsi, 0, sizeof(lcs6821n_t)); diff --git a/src/scsi_aha1540.c b/src/scsi_aha1540.c index f3bb9b6e..c1282169 100644 --- a/src/scsi_aha1540.c +++ b/src/scsi_aha1540.c @@ -2232,7 +2232,7 @@ static uint16_t port_sw_mapping[8] = 0x330, 0x334, 0x230, 0x234, 0x130, 0x134, -1, -1 }; -static void *scsi_aha1542c_init(char *bios_fn) +static void *scsi_aha1542c_init() { aha154x_t *scsi = malloc(sizeof(aha154x_t)); uint32_t addr; @@ -2283,7 +2283,7 @@ static void *scsi_aha1542c_init(char *bios_fn) return scsi; } -static void *scsi_bt545s_init(char *bios_fn) +static void *scsi_bt545s_init() { aha154x_t *scsi = malloc(sizeof(aha154x_t)); uint32_t addr; diff --git a/src/sound.c b/src/sound.c index f39a3f17..322c9a56 100644 --- a/src/sound.c +++ b/src/sound.c @@ -102,7 +102,7 @@ int sound_card_get_from_internal_name(char *s) return 0; } -void sound_card_init() +void sound_card_init(int card) { if (sound_cards[sound_card_current].device) device_add(sound_cards[sound_card_current].device); diff --git a/src/sound.h b/src/sound.h index d97406ff..018219ac 100644 --- a/src/sound.h +++ b/src/sound.h @@ -10,7 +10,7 @@ struct device_t *sound_card_getdevice(int card); int sound_card_has_config(int card); char *sound_card_get_internal_name(int card); int sound_card_get_from_internal_name(char *s); -void sound_card_init(); +void sound_card_init(int card); void sound_set_cd_volume(unsigned int vol_l, unsigned int vol_r); #define CD_FREQ 44100 diff --git a/src/sound_adlibgold.c b/src/sound_adlibgold.c index a8ce40b3..be82272c 100644 --- a/src/sound_adlibgold.c +++ b/src/sound_adlibgold.c @@ -125,7 +125,7 @@ static int treble_cut[6] = (int)(0.354 * 16384) /*-3 dB - filter output is at +6 dB*/ }; -void adgold_timer_poll(); +void adgold_timer_poll(void *p); void adgold_update(adgold_t *adgold); void adgold_update_irq_status(adgold_t *adgold) diff --git a/src/vid_s3.c b/src/vid_s3.c index 26aa5cfc..509d91fd 100644 --- a/src/vid_s3.c +++ b/src/vid_s3.c @@ -137,7 +137,7 @@ typedef struct s3_t #define INT_FIFO_EMP (1 << 3) #define INT_MASK 0xf -void s3_updatemapping(); +void s3_updatemapping(s3_t *s3); void s3_accel_write(uint32_t addr, uint8_t val, void *p); void s3_accel_write_w(uint32_t addr, uint16_t val, void *p);