From 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 May 2018 16:02:14 +0200 Subject: mir_forkThread - stronger typizatioin for thread function parameter --- plugins/AutoShutdown/src/cpuusage.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/AutoShutdown/src/cpuusage.cpp') diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index 2959013407..25eb542f35 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -72,10 +72,8 @@ static BOOL CallBackAndWait(struct CpuUsageThreadParams *param, BYTE nCpuUsage) return !Miranda_IsTerminated(); } -static void WinNT_PollThread(void *vparam) +static void WinNT_PollThread(CpuUsageThreadParams *param) { - CpuUsageThreadParams *param = (CpuUsageThreadParams*)vparam; - DWORD dwBufferSize = 0, dwCount; BYTE *pBuffer = nullptr; PERF_DATA_BLOCK *pPerfData = nullptr; @@ -204,7 +202,7 @@ DWORD PollCpuUsage(CPUUSAGEAVAILPROC pfnDataAvailProc, LPARAM lParam, DWORD dwDe param->hFirstEvent = hFirstEvent; /* start thread */ - if (mir_forkthread(WinNT_PollThread, param) != INVALID_HANDLE_VALUE) + if (mir_forkThread(WinNT_PollThread, param) != INVALID_HANDLE_VALUE) WaitForSingleObject(hFirstEvent, INFINITE); /* wait for first success */ else mir_free(param); /* thread not started */ -- cgit v1.2.3