From 041f39572e8fa90c43dd92d310f28ec8776cd071 Mon Sep 17 00:00:00 2001 From: Ilia Shipitsin Date: Sun, 23 Aug 2026 12:25:27 +0200 Subject: [PATCH] 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 *). --- src/Mayaqua/Win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mayaqua/Win32.c b/src/Mayaqua/Win32.c index db65d457..db00184c 100644 --- a/src/Mayaqua/Win32.c +++ b/src/Mayaqua/Win32.c @@ -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