From fc3a558515c024bcffd5e65a6f2d72ae3e6a3eb9 Mon Sep 17 00:00:00 2001 From: theoractice Date: Sun, 20 Mar 2016 18:58:18 +0800 Subject: [PATCH] Fix a minor compiler error in VisualStudio with CMake --- common_x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_x86.h b/common_x86.h index ab9f22b0d..4363fb2f4 100644 --- a/common_x86.h +++ b/common_x86.h @@ -62,7 +62,7 @@ static void __inline blas_lock(volatile BLASULONG *address){ #if defined(_MSC_VER) && !defined(__clang__) // use intrinsic instead of inline assembly - ret = _InterlockedExchange(address, 1); + ret = _InterlockedExchange((volatile LONG *)address, 1); // inline assembly /*__asm { mov eax, address