mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-09-19 09:51:28 +03:00
Fix -Wincompatible-pointer-types in Win32Inc32 and Win32Dec32
Explicitly cast the `UINT *` pointer to `(volatile LONG *)` before passing it to `InterlockedIncrement` and `InterlockedDecrement` in `src/Mayaqua/Win32.c`. This resolves a build error where passing a `UINT *` (unsigned int *) was flagged as an incompatible pointer type, because the APIs expect a `volatile LONG *` (volatile long *).
This commit is contained in:
+2
-2
@@ -3033,13 +3033,13 @@ void Win32GetSystemTime(SYSTEMTIME *system_time)
|
||||
// Increment of 32bit integer
|
||||
void Win32Inc32(UINT *value)
|
||||
{
|
||||
InterlockedIncrement(value);
|
||||
InterlockedIncrement((volatile LONG *)value);
|
||||
}
|
||||
|
||||
// Decrement of 32bit integer
|
||||
void Win32Dec32(UINT *value)
|
||||
{
|
||||
InterlockedDecrement(value);
|
||||
InterlockedDecrement((volatile LONG *)value);
|
||||
}
|
||||
|
||||
// Sleep the thread
|
||||
|
||||
Reference in New Issue
Block a user