From 63b1816be6168d70f2695f0a24d32e356850c8d0 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Mon, 14 Jan 2013 19:13:48 +0100 Subject: [PATCH] Add an explicit cast to shut up g++47 on FreeBSD --- neo/idlib/sys/posix/posix_thread.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neo/idlib/sys/posix/posix_thread.cpp b/neo/idlib/sys/posix/posix_thread.cpp index 392fd6b2..5b7a301e 100644 --- a/neo/idlib/sys/posix/posix_thread.cpp +++ b/neo/idlib/sys/posix/posix_thread.cpp @@ -103,7 +103,14 @@ Sys_GetCurrentThreadID */ uintptr_t Sys_GetCurrentThreadID() { - return pthread_self(); + /* + * This cast is save because pthread_self() + * returns a pointer and uintptr_t is + * designed to hold a pointer. The compiler + * is just too stupid to know. :) + * -- Yamagi + */ + return ( uintptr_t )pthread_self(); } /*