1
0
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:
Ilia Shipitsin
2026-08-23 12:25:27 +02:00
parent adc8f06c02
commit 041f39572e
+2 -2
View File
@@ -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