From c14d5a8c29b0b0826ece0fec7d16d69b0085112b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 2 Aug 2020 10:32:34 +0300 Subject: [PATCH] Removed unneeded thread function return parameter. --- a2091.cpp | 3 +-- akiko.cpp | 3 +-- blkdev_cdimage.cpp | 6 ++---- cdtv.cpp | 4 ++-- cdtvcr.cpp | 4 ++-- consolehook.cpp | 3 +-- epsonprinter.cpp | 3 +-- filesys.cpp | 7 +++---- hardfile.cpp | 6 +++--- ide.cpp | 3 +-- newcpu.cpp | 8 +++----- od-win32/avioutput.cpp | 5 ++--- od-win32/cda_play.cpp | 3 +-- od-win32/cda_play.h | 2 +- od-win32/direct3d.cpp | 3 +-- od-win32/driveclick_win32.cpp | 3 +-- od-win32/lcd.cpp | 5 ++--- od-win32/parser.cpp | 6 ++---- od-win32/picasso96_win.cpp | 3 +-- od-win32/posixemu.cpp | 10 +++++----- od-win32/threaddep/thread.h | 4 ++-- od-win32/win32_uaenet.cpp | 6 ++---- ppc/ppc.cpp | 3 +-- sana2.cpp | 7 +++---- scsiemul.cpp | 7 +++---- slirp_uae.cpp | 3 +-- traps.cpp | 8 ++------ uaenative.cpp | 3 +-- uaeserial.cpp | 7 +++---- 29 files changed, 54 insertions(+), 84 deletions(-) diff --git a/a2091.cpp b/a2091.cpp index 9ec9ac16..e19fb2dd 100644 --- a/a2091.cpp +++ b/a2091.cpp @@ -3869,7 +3869,7 @@ static void wd_execute_cmd(struct wd_state *wds, int cmd, int msg, int unit) } } -static void *scsi_thread (void *wdv) +static void scsi_thread (void *wdv) { struct wd_state *wds = (struct wd_state*)wdv; struct wd_chip_state *wd = &wds->wc; @@ -3883,7 +3883,6 @@ static void *scsi_thread (void *wdv) wd_execute_cmd(wds, cmd, msg, unit); } wds->scsi_thread_running = -1; - return 0; } void init_wd_scsi (struct wd_state *wd) diff --git a/akiko.cpp b/akiko.cpp index 21d1807d..344cde99 100644 --- a/akiko.cpp +++ b/akiko.cpp @@ -1508,7 +1508,7 @@ static void AKIKO_hsync_handler (void) } /* cdrom data buffering thread */ -static void *akiko_thread (void *null) +static void akiko_thread (void *null) { int secnum; uae_u8 *tmp1; @@ -1629,7 +1629,6 @@ static void *akiko_thread (void *null) sleep_millis (10); } akiko_thread_running = -1; - return 0; } STATIC_INLINE uae_u8 akiko_get_long (uae_u32 v, int offset) diff --git a/blkdev_cdimage.cpp b/blkdev_cdimage.cpp index 17735eee..012372e9 100644 --- a/blkdev_cdimage.cpp +++ b/blkdev_cdimage.cpp @@ -391,7 +391,7 @@ static int setstate (struct cdunit *cdu, int state, int playpos) return 0; } -static void *cdda_unpack_func (void *v) +static void cdda_unpack_func (void *v) { cdimage_unpack_thread = 1; mp3decoder *mp3dec = NULL; @@ -432,7 +432,6 @@ static void *cdda_unpack_func (void *v) } delete mp3dec; cdimage_unpack_thread = -1; - return 0; } static void audio_unpack (struct cdunit *cdu, struct cdtoc *t) @@ -753,7 +752,7 @@ end: return restart; } -static void *cdda_play_func (void *v) +static void cdda_play_func (void *v) { int outpos = -1; struct cdunit *cdu = (struct cdunit*)v; @@ -773,7 +772,6 @@ static void *cdda_play_func (void *v) cdu->cdda_play = 1; } cdu->thread_active = false; - return NULL; } static void cdda_stop (struct cdunit *cdu) diff --git a/cdtv.cpp b/cdtv.cpp index 8aa0e35a..20ab05f2 100644 --- a/cdtv.cpp +++ b/cdtv.cpp @@ -690,7 +690,7 @@ static void dma_do_thread (void) cd_finished = 1; } -static void *dev_thread (void *p) +static void dev_thread (void *p) { write_log (_T("CDTV: CD thread started\n")); thread_alive = 1; @@ -699,7 +699,7 @@ static void *dev_thread (void *p) uae_u32 b = read_comm_pipe_u32_blocking (&requests); if (b == 0xffff) { thread_alive = -1; - return NULL; + return; } if (unitnum < 0) continue; diff --git a/cdtvcr.cpp b/cdtvcr.cpp index 5113a3d0..d77540dd 100644 --- a/cdtvcr.cpp +++ b/cdtvcr.cpp @@ -856,7 +856,7 @@ static addrbank cdtvcr_bank = { ABFLAG_IO | ABFLAG_SAFE, S_READ, S_WRITE }; -static void *dev_thread (void *p) +static void dev_thread (void *p) { write_log (_T("CDTV-CR: CD thread started\n")); thread_alive = 1; @@ -865,7 +865,7 @@ static void *dev_thread (void *p) uae_u32 b = read_comm_pipe_u32_blocking (&requests); if (b == 0xffff) { thread_alive = -1; - return NULL; + return; } if (unitnum < 0) continue; diff --git a/consolehook.cpp b/consolehook.cpp index 4fbae8d4..87e2baab 100644 --- a/consolehook.cpp +++ b/consolehook.cpp @@ -59,7 +59,7 @@ void consolehook_config (struct uae_prefs *p) add_filesys_config (p, -1, &ci); } -static void *console_thread (void *v) +static void console_thread (void *v) { uae_set_thread_priority (NULL, 1); for (;;) { @@ -72,7 +72,6 @@ static void *console_thread (void *v) record_key_direct ((0x10 << 1) | 0); record_key_direct ((0x10 << 1) | 1); } - return NULL; } int consolehook_activate (void) diff --git a/epsonprinter.cpp b/epsonprinter.cpp index 15882b3e..3bc8af9e 100644 --- a/epsonprinter.cpp +++ b/epsonprinter.cpp @@ -713,7 +713,7 @@ STATIC_INLINE void getcolor (uae_u8 *Tpage, uae_u8 *Tcpage, int x, int y, int Tp *b = 255 - color_b; } -static void *prt_thread (void *p) +static void prt_thread(void *p) { Bit16u x, y; HDC TprinterDC = printerDC; @@ -885,7 +885,6 @@ end: DeleteObject (TprinterDC); DeleteObject (TmemHDC); write_log (_T("EPSONPRINTER: background thread finished\n")); - return 0; } static void outputPage(void) diff --git a/filesys.cpp b/filesys.cpp index 570e13d2..ef631f88 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -3225,7 +3225,7 @@ static bool mount_cd(UnitInfo *uinfo, int nr, struct mytimeval *ctime, uae_u64 * } #ifdef UAE_FILESYS_THREADS -static void *filesys_thread (void *unit_v); +static void filesys_thread (void *unit_v); #endif static void filesys_start_thread (UnitInfo *ui, int nr) { @@ -7139,17 +7139,16 @@ static int filesys_iteration(UnitInfo *ui) } -static void *filesys_thread (void *unit_v) +static void filesys_thread (void *unit_v) { UnitInfo *ui = (UnitInfo *)unit_v; uae_set_thread_priority (NULL, 1); for (;;) { if (!filesys_iteration(ui)) { - return 0; + return; } } - return 0; } #endif diff --git a/hardfile.cpp b/hardfile.cpp index 46bf16f9..9feeed19 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -2448,7 +2448,7 @@ static void abort_async (struct hardfileprivdata *hfpd, uaecptr request, int err } } -static void *hardfile_thread (void *devs); +static void hardfile_thread (void *devs); static int start_thread (TrapContext *ctx, int unit) { struct hardfileprivdata *hfpd = &hardfpd[unit]; @@ -2997,7 +2997,7 @@ static uae_u32 REGPARAM2 hardfile_beginio (TrapContext *ctx) } } -static void *hardfile_thread (void *devs) +static void hardfile_thread (void *devs) { struct hardfileprivdata *hfpd = (struct hardfileprivdata*)devs; @@ -3013,7 +3013,7 @@ static void *hardfile_thread (void *devs) hfpd->thread_running = 0; uae_sem_post (&hfpd->sync_sem); uae_sem_post (&change_sem); - return 0; + return; } else if (hardfile_do_io(ctx, get_hardfile_data_controller(hfpd - &hardfpd[0]), hfpd, iobuf, request) == 0) { put_byte_host(iobuf + 30, get_byte_host(iobuf + 30) & ~1); trap_put_bytes(ctx, iobuf + 8, request + 8, 48 - 8); diff --git a/ide.cpp b/ide.cpp index 1b600f43..b5cd7a2f 100644 --- a/ide.cpp +++ b/ide.cpp @@ -1553,7 +1553,7 @@ void ide_write_reg (struct ide_hdf *ide, int ide_reg, uae_u32 val) } } -static void *ide_thread (void *idedata) +static void ide_thread (void *idedata) { struct ide_thread_state *its = (struct ide_thread_state*)idedata; for (;;) { @@ -1568,7 +1568,6 @@ static void *ide_thread (void *idedata) do_process_rw_command (ide); } its->state = -1; - return 0; } void start_ide_thread(struct ide_thread_state *its) diff --git a/newcpu.cpp b/newcpu.cpp index 14cedb37..986cc369 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5026,7 +5026,7 @@ void process_cpu_indirect_memory_write(uae_u32 addr, uae_u32 data, int size) cpu_thread_indirect_mode = 0xff; } -static void run_cpu_thread(void *(*f)(void *)) +static void run_cpu_thread(void (*f)(void *)) { int framecnt = -1; int vp = 0; @@ -5285,7 +5285,7 @@ void execute_normal(void) typedef void compiled_handler (void); #ifdef WITH_THREADED_CPU -static void *cpu_thread_run_jit(void *v) +static void cpu_thread_run_jit(void *v) { cpu_thread_tid = uae_thread_get_id(); cpu_thread_active = 1; @@ -5314,7 +5314,6 @@ static void *cpu_thread_run_jit(void *v) } #endif cpu_thread_active = 0; - return 0; } #endif @@ -6072,7 +6071,7 @@ cont: #endif #ifdef WITH_THREADED_CPU -static void *cpu_thread_run_2(void *v) +static void cpu_thread_run_2(void *v) { bool exit = false; struct regstruct *r = ®s; @@ -6106,7 +6105,6 @@ static void *cpu_thread_run_2(void *v) } ENDTRY } cpu_thread_active = 0; - return 0; } #endif diff --git a/od-win32/avioutput.cpp b/od-win32/avioutput.cpp index 6484a4c0..1c8f6663 100644 --- a/od-win32/avioutput.cpp +++ b/od-win32/avioutput.cpp @@ -1385,7 +1385,7 @@ void AVIOutput_End(void) AVIOutput_End2(true); } -static void *AVIOutput_worker (void *arg); +static void AVIOutput_worker (void *arg); static void AVIOutput_Begin2(bool fullstart, bool immediate) { @@ -1636,7 +1636,7 @@ void AVIOutput_Initialize (void) } -static void *AVIOutput_worker (void *arg) +static void AVIOutput_worker (void *arg) { bool quit = false; write_log (_T("AVIOutput worker thread started\n")); @@ -1675,7 +1675,6 @@ static void *AVIOutput_worker (void *arg) AVIOutput_AVIWriteAudio_Thread_End(); write_log (_T("AVIOutput worker thread killed. quit=%d\n"), quit); alive = 0; - return 0; } void AVIOutput_Toggle (int mode, bool immediate) diff --git a/od-win32/cda_play.cpp b/od-win32/cda_play.cpp index c7324357..86e5ec15 100644 --- a/od-win32/cda_play.cpp +++ b/od-win32/cda_play.cpp @@ -589,7 +589,7 @@ end: return restart; } -void *ciw_cdda_play(void *v) +void ciw_cdda_play(void *v) { struct cda_play *ciw = (struct cda_play *)v; int outpos = -1; @@ -608,7 +608,6 @@ void *ciw_cdda_play(void *v) ciw->cdda_play = 1; } ciw->cdda_play = 0; - return NULL; } void ciw_cdda_stop(struct cda_play *ciw) diff --git a/od-win32/cda_play.h b/od-win32/cda_play.h index d290fc8c..8f006227 100644 --- a/od-win32/cda_play.h +++ b/od-win32/cda_play.h @@ -68,6 +68,6 @@ struct cda_play cda_play_read_block read_block; }; -void *ciw_cdda_play(void *ciw); +void ciw_cdda_play(void *ciw); void ciw_cdda_stop(struct cda_play *ciw); int ciw_cdda_setstate(struct cda_play *ciw, int state, int playpos); \ No newline at end of file diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index cd9da64c..28f72ad1 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -3071,7 +3071,7 @@ struct d3d_initargs }; static struct d3d_initargs d3dargs; -static void *D3D_init_start (void *p) +static void D3D_init_start (void *p) { struct d3dstruct *d3d = &d3ddata[0]; struct timeval tv1, tv2; @@ -3100,7 +3100,6 @@ static void *D3D_init_start (void *p) write_log (_T("Threaded D3D_init() finished\n")); d3d->frames_since_init = 0; d3d->fakemode = false; - return NULL; } static const TCHAR *xD3D_init (HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmulth, int mmultv) diff --git a/od-win32/driveclick_win32.cpp b/od-win32/driveclick_win32.cpp index 5b8050f8..10d1c2e1 100644 --- a/od-win32/driveclick_win32.cpp +++ b/od-win32/driveclick_win32.cpp @@ -90,7 +90,7 @@ void driveclick_fdrawcmd_vsync(void) } } -static void *driveclick_thread (void *v) +static void driveclick_thread (void *v) { for (;;) { int drive, cyl; @@ -109,7 +109,6 @@ static void *driveclick_thread (void *v) CmdSeek(h[drive], cyl); } } - return NULL; } static int driveclick_fdrawcmd_init(int drive) diff --git a/od-win32/lcd.cpp b/od-win32/lcd.cpp index b594dc98..29ba5b6f 100644 --- a/od-win32/lcd.cpp +++ b/od-win32/lcd.cpp @@ -43,7 +43,7 @@ static LOGILCDSETBACKGROUND pLogiLcdMonoSetBackground, pLogiLcdColorSetBackgroun #define LOGITECH_LCD_DLL _T("SOFTWARE\\Classes\\CLSID\\{d0e790a5-01a7-49ae-ae0b-e986bdd0c21b}\\ServerBinary") -static void *lcd_thread(void *null); +static void lcd_thread(void *null); void lcd_close (void) { @@ -255,7 +255,7 @@ void lcd_update(int led, int on) lcd_updated = true; } -static void *lcd_thread(void *null) +static void lcd_thread(void *null) { while (lcd_thread_active > 0) { bool c; @@ -272,7 +272,6 @@ static void *lcd_thread(void *null) } } lcd_thread_active = 0; - return NULL; } int lcd_open (void) diff --git a/od-win32/parser.cpp b/od-win32/parser.cpp index 90248e56..0280ef98 100644 --- a/od-win32/parser.cpp +++ b/od-win32/parser.cpp @@ -181,7 +181,7 @@ static int openprinter_ps (void) return 1; } -static void *prt_thread (void *p) +static void prt_thread (void *p) { uae_u8 **buffers = (uae_u8**)p; int err, cnt, ok; @@ -223,7 +223,6 @@ static void *prt_thread (void *p) } unload_ghostscript (); prt_running--; - return 0; } static int doflushprinter (void) @@ -668,7 +667,7 @@ static void startwce(struct uaeserialdatawin32 *sd, DWORD *evtmask) WaitCommEvent(sd->hCom, evtmask, &sd->olwce); } -static void *uaeser_trap_thread (void *arg) +static void uaeser_trap_thread (void *arg) { struct uaeserialdatawin32 *sd = (struct uaeserialdatawin32*)arg; HANDLE handles[4]; @@ -710,7 +709,6 @@ static void *uaeser_trap_thread (void *arg) } sd->threadactive = 0; uae_sem_post (&sd->sync_sem); - return 0; } void uaeser_trigger (void *vsd) diff --git a/od-win32/picasso96_win.cpp b/od-win32/picasso96_win.cpp index acac9adb..cfedcb73 100644 --- a/od-win32/picasso96_win.cpp +++ b/od-win32/picasso96_win.cpp @@ -5340,7 +5340,7 @@ static void picasso_flushpixels(int index, uae_u8 *src, int off, bool render) } } -static void *render_thread(void *v) +static void render_thread(void *v) { render_thread_state = 1; for (;;) { @@ -5361,7 +5361,6 @@ static void *render_thread(void *v) } } render_thread_state = -1; - return 0; } extern addrbank gfxmem_bank; diff --git a/od-win32/posixemu.cpp b/od-win32/posixemu.cpp index 43dead3c..0fba9e22 100644 --- a/od-win32/posixemu.cpp +++ b/od-win32/posixemu.cpp @@ -149,21 +149,21 @@ typedef unsigned (__stdcall *BEGINTHREADEX_FUNCPTR)(void *); struct thparms { - void *(*f)(void*); + void (*f)(void *); void *arg; }; static unsigned __stdcall thread_init (void *f) { struct thparms *thp = (struct thparms*)f; - void *(*fp)(void*) = thp->f; + void (*fp)(void *) = thp->f; void *arg = thp->arg; xfree (f); #ifndef _CONSOLE __try { - fp (arg); + fp(arg); #endif #ifndef _CONSOLE } __except (WIN32_ExceptionFilter (GetExceptionInformation (), GetExceptionCode ())) { @@ -183,7 +183,7 @@ void uae_end_thread (uae_thread_id *tid) typedef BOOL(WINAPI* AVSETMMTHREADPRIORITY)(HANDLE, AVRT_PRIORITY); static AVSETMMTHREADPRIORITY pAvSetMmThreadPriority; -int uae_start_thread (const TCHAR *name, void *(*f)(void *), void *arg, uae_thread_id *tid) +int uae_start_thread (const TCHAR *name, void (*f)(void *), void *arg, uae_thread_id *tid) { HANDLE hThread; int result = 1; @@ -218,7 +218,7 @@ int uae_start_thread (const TCHAR *name, void *(*f)(void *), void *arg, uae_thre return result; } -int uae_start_thread_fast (void *(*f)(void *), void *arg, uae_thread_id *tid) +int uae_start_thread_fast (void (*f)(void *), void *arg, uae_thread_id *tid) { int v = uae_start_thread (NULL, f, arg, tid); if (*tid) { diff --git a/od-win32/threaddep/thread.h b/od-win32/threaddep/thread.h index 4df8a22c..98448f39 100644 --- a/od-win32/threaddep/thread.h +++ b/od-win32/threaddep/thread.h @@ -7,8 +7,8 @@ extern int uae_sem_trywait_delay(uae_sem_t*, int); extern void uae_sem_post(uae_sem_t*); extern void uae_sem_wait(uae_sem_t*t); extern void uae_sem_init(uae_sem_t*, int manual_reset, int initial_state); -extern int uae_start_thread(const TCHAR *name, void *(*f)(void *), void *arg, uae_thread_id *thread); -extern int uae_start_thread_fast(void *(*f)(void *), void *arg, uae_thread_id *thread); +extern int uae_start_thread(const TCHAR *name, void (*f)(void *), void *arg, uae_thread_id *thread); +extern int uae_start_thread_fast(void (*f)(void *), void *arg, uae_thread_id *thread); extern void uae_end_thread(uae_thread_id *thread); extern void uae_set_thread_priority(uae_thread_id *, int); extern uae_thread_id uae_thread_get_id(void); diff --git a/od-win32/win32_uaenet.cpp b/od-win32/win32_uaenet.cpp index 7c049c6b..ad952bf9 100644 --- a/od-win32/win32_uaenet.cpp +++ b/od-win32/win32_uaenet.cpp @@ -176,7 +176,7 @@ static void *uaenet_trap_thread (void *arg) } #endif -static void *uaenet_trap_threadr (void *arg) +static void uaenet_trap_threadr (void *arg) { struct uaenetdatawin32 *sd = (struct uaenetdatawin32*)arg; struct pcap_pkthdr *header; @@ -200,10 +200,9 @@ static void *uaenet_trap_threadr (void *arg) } sd->threadactiver = 0; uae_sem_post (&sd->sync_semr); - return 0; } -static void *uaenet_trap_threadw (void *arg) +static void uaenet_trap_threadw (void *arg) { struct uaenetdatawin32 *sd = (struct uaenetdatawin32*)arg; @@ -234,7 +233,6 @@ static void *uaenet_trap_threadw (void *arg) } sd->threadactivew = 0; uae_sem_post (&sd->sync_semw); - return 0; } void uaenet_trigger (void *vsd) diff --git a/ppc/ppc.cpp b/ppc/ppc.cpp index 5cc70222..8f5fe421 100644 --- a/ppc/ppc.cpp +++ b/ppc/ppc.cpp @@ -607,7 +607,7 @@ static void uae_ppc_cpu_reset(void) ppc_state = PPC_STATE_ACTIVE; } -static void *ppc_thread(void *v) +static void ppc_thread(void *v) { if (using_qemu()) { write_log(_T("PPC: Warning - ppc_thread started with QEMU impl\n")); @@ -620,7 +620,6 @@ static void *ppc_thread(void *v) write_log(_T("ppc_cpu_run() exited.\n")); ppc_thread_running = false; } - return NULL; } void uae_ppc_execute_check(void) diff --git a/sana2.cpp b/sana2.cpp index 10410f90..22258313 100644 --- a/sana2.cpp +++ b/sana2.cpp @@ -270,7 +270,7 @@ static struct priv_s2devstruct *getps2devstruct(TrapContext *ctx, uae_u8 *iobuf, return &pdevst[idx]; } -static void *dev_thread (void *devs); +static void dev_thread (void *devs); static int start_thread (struct s2devstruct *dev) { if (dev->thread_running) @@ -1504,7 +1504,7 @@ err: return err; } -static void *dev_thread (void *devs) +static void dev_thread (void *devs) { struct s2devstruct *dev = (struct s2devstruct*)devs; @@ -1521,7 +1521,7 @@ static void *dev_thread (void *devs) uae_sem_post (&dev->sync_sem); uae_sem_post (&change_sem); write_log (_T("%s: dev_thread killed\n"), getdevname ()); - return 0; + return; } struct priv_s2devstruct *pdev = getps2devstruct(ctx, iobuf, request); asyncreq *ar = get_async_request (dev, request, 1); @@ -1544,7 +1544,6 @@ static void *dev_thread (void *devs) trap_background_set_complete(ctx); uae_sem_post (&change_sem); } - return 0; } static uae_u32 REGPARAM2 dev_init_2 (TrapContext *ctx) diff --git a/scsiemul.cpp b/scsiemul.cpp index 996c873d..83f6af2a 100644 --- a/scsiemul.cpp +++ b/scsiemul.cpp @@ -135,7 +135,7 @@ static const TCHAR *getdevname (int type) } } -static void *dev_thread(void *devs); +static void dev_thread(void *devs); static int start_thread(struct devstruct *dev) { if (dev->thread_running) @@ -1102,7 +1102,7 @@ static uae_u32 REGPARAM2 dev_beginio(TrapContext *ctx) } } -static void *dev_thread (void *devs) +static void dev_thread (void *devs) { struct devstruct *dev = (struct devstruct*)devs; @@ -1118,7 +1118,7 @@ static void *dev_thread (void *devs) dev->thread_running = 0; uae_sem_post (&dev->sync_sem); uae_sem_post (&change_sem); - return 0; + return; } else if (dev_do_io(ctx, dev, iobuf, request) == 0) { put_byte_host(iobuf + 30, get_byte_host(iobuf + 30) & ~1); trap_put_bytes(ctx, iobuf + 8, request + 8, 48 - 8); @@ -1132,7 +1132,6 @@ static void *dev_thread (void *devs) trap_background_set_complete(ctx); uae_sem_post (&change_sem); } - return 0; } static uae_u32 REGPARAM2 dev_init_2(TrapContext *ctx, int type) diff --git a/slirp_uae.cpp b/slirp_uae.cpp index 68f444a8..ff5007c6 100644 --- a/slirp_uae.cpp +++ b/slirp_uae.cpp @@ -137,7 +137,7 @@ static volatile int slirp_thread_active; static uae_thread_id slirp_tid; extern uae_sem_t slirp_sem2; -static void *slirp_receive_func(void *arg) +static void slirp_receive_func(void *arg) { slirp_thread_active = 1; while (slirp_thread_active) { @@ -175,7 +175,6 @@ static void *slirp_receive_func(void *arg) } } slirp_thread_active = -1; - return 0; } int slirp_can_output(void) diff --git a/traps.cpp b/traps.cpp index 3fe96251..418e7eb1 100644 --- a/traps.cpp +++ b/traps.cpp @@ -264,7 +264,7 @@ static TrapContext *current_context; /* * Thread body for trap context */ -static void *trap_thread (void *arg) +static void trap_thread (void *arg) { TrapContext *context = (TrapContext *) arg; @@ -301,9 +301,6 @@ static void *trap_thread (void *arg) uae_sem_post (&context->switch_to_emu_sem); /* Good bye, cruel world... */ - - /* dummy return value */ - return 0; } @@ -552,7 +549,7 @@ static void hardware_trap_ack(TrapContext *ctx) xfree(ctx); } -static void *hardware_trap_thread(void *arg) +static void hardware_trap_thread(void *arg) { int tid = (uae_u32)arg; for (;;) { @@ -612,7 +609,6 @@ static void *hardware_trap_thread(void *arg) } } hardware_trap_kill[tid] = -1; - return 0; } void trap_background_set_complete(TrapContext *ctx) diff --git a/uaenative.cpp b/uaenative.cpp index a6c0a0cf..a258645f 100644 --- a/uaenative.cpp +++ b/uaenative.cpp @@ -449,7 +449,7 @@ static void do_call_function (struct uni *uni) } } -static void *uaenative_thread(void *arg) +static void uaenative_thread(void *arg) { struct library_data *library_data = (struct library_data *) arg; @@ -468,7 +468,6 @@ static void *uaenative_thread(void *arg) write_log (_T("uni: uaenative_thread exiting\n")); free_library_data(library_data); - return NULL; } uae_u32 uaenative_call_function (TrapContext *ctx, int flags) diff --git a/uaeserial.cpp b/uaeserial.cpp index ffc4a570..65e2afdc 100644 --- a/uaeserial.cpp +++ b/uaeserial.cpp @@ -158,7 +158,7 @@ static struct devstruct *getdevstruct (int uniq) return 0; } -static void *dev_thread (void *devs); +static void dev_thread (void *devs); static int start_thread (struct devstruct *dev) { init_comm_pipe (&dev->requests, 100, 1); @@ -628,7 +628,7 @@ end: return err; } -static void *dev_thread (void *devs) +static void dev_thread (void *devs) { struct devstruct *dev = (struct devstruct*)devs; @@ -644,7 +644,7 @@ static void *dev_thread (void *devs) dev->thread_running = 0; uae_sem_post (&dev->sync_sem); uae_sem_post (&change_sem); - return 0; + return; } else if (get_async_request (dev, request, 1)) { uae_ReplyMsg (request); release_async_request (dev, request); @@ -657,7 +657,6 @@ static void *dev_thread (void *devs) trap_background_set_complete(ctx); uae_sem_post (&change_sem); } - return 0; } static uae_u32 REGPARAM2 dev_init (TrapContext *context) -- 2.47.3