Skip to content

Commit

Permalink
Merge pull request #5603 from FearlessTobi/port-4887
Browse files Browse the repository at this point in the history
Port yuzu-emu/yuzu#4887: "microprofile: Silence warning in headers"
  • Loading branch information
BreadFish64 authored Nov 17, 2020
2 parents 6772e46 + 8f7ac4d commit 3115529
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion externals/microprofile/microprofile.h
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,11 @@ typedef HANDLE MicroProfileThread;
DWORD _stdcall ThreadTrampoline(void* pFunc)
{
MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc;
return (uint32_t)F(0);

// The return value of F will always return a void*, however, this is for
// compatibility with pthreads. The underlying "address" of the pointer
// is always a 32-bit value, so this cast is safe to perform.
return static_cast<DWORD>(reinterpret_cast<uint64_t>(F(0)));
}

void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
Expand Down

0 comments on commit 3115529

Please sign in to comment.