Fix compile error (dotnet/coreclr#6641)
authorGuo Xiao <guoxiao@users.noreply.github.com>
Sun, 7 Aug 2016 15:20:52 +0000 (10:20 -0500)
committerJan Kotas <jkotas@microsoft.com>
Sun, 7 Aug 2016 15:20:52 +0000 (08:20 -0700)
error: cannot initialize return object of type 'void *' with an lvalue
of type 'void ()'

Commit migrated from https://github.com/dotnet/coreclr/commit/ab6bc52f502498d6f6380b8b58d3495a7bd84f35

src/coreclr/src/vm/threadsuspend.cpp

index 2cf32df..5785ad7 100644 (file)
@@ -7314,11 +7314,11 @@ VOID * GetHijackAddr(Thread *pThread, EECodeInfo *codeInfo)
 #ifdef _TARGET_X86_
     if (returnKind == RT_Float)
     {
-        return OnHijackFPTripThread;
+        return reinterpret_cast<VOID *>(OnHijackTripThread);
     }
 #endif // _TARGET_X86_
 
-    return OnHijackTripThread;
+    return reinterpret_cast<VOID *>(OnHijackTripThread);
 }
 
 #ifndef PLATFORM_UNIX