From ed7171099bf5e7483cb727baa1afd727e912ed06 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Fri, 6 Feb 2026 14:33:34 +0300 Subject: [PATCH] Silence MSVC warning about unreferenced formal parameter. Closes https://github.com/boostorg/thread/pull/382. --- src/win32/thread.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/win32/thread.cpp b/src/win32/thread.cpp index 45c2651f..fd49f17b 100644 --- a/src/win32/thread.cpp +++ b/src/win32/thread.cpp @@ -577,10 +577,18 @@ namespace boost } Reason; } REASON_CONTEXT, *PREASON_CONTEXT; typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG); +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable: 4100) // unreferenced formal parameter +#endif static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay) { return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE); } +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail