Repository navigation
Commit f7b3664
committed
dlmalloc: cast Win32 spin-lock word to LONG volatile* in CAS_LOCK/CLEAR_LOCK
MLOCK_T is int, but on the Win32 MSC path CAS_LOCK/CLEAR_LOCK map to
_InterlockedExchange(LONG volatile *, LONG), so the int* lock word is
passed to a LONG volatile * parameter. clang 22 promotes
-Wincompatible-pointer-types to an error by default, which breaks the
clang-cl build (32- and 64-bit) with:
error: incompatible pointer types passing 'int *' to parameter of type
'volatile long *' [-Wincompatible-pointer-types]
Cast to (LONG volatile *), matching what the ffi_spin_peek macro just
below already does in its _MSC_VER branch. LONG and int are both 32-bit
on Windows, so this is a type-correctness fix with no behavioral change.1 parent c93f942 commit f7b3664
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1916 | 1916 | | |
1917 | 1917 | | |
1918 | 1918 | | |
1919 | | - | |
1920 | | - | |
| 1919 | + | |
| 1920 | + | |
1921 | 1921 | | |
1922 | 1922 | | |
1923 | 1923 | | |
| |||
0 commit comments