summaryrefslogtreecommitdiff
path: root/rts/Task.h
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-07-14 17:22:10 +0100
committerIan Lynagh <igloo@earth.li>2012-07-14 17:22:10 +0100
commit01bd47863a4218aadce17469c482d33baa862c3c (patch)
tree0850cf6fdbd7b01e625cef7ab82991311c6b14d8 /rts/Task.h
parent68b9d28c9d9c2b1beead574568a2ca8393bf4099 (diff)
downloadhaskell-01bd47863a4218aadce17469c482d33baa862c3c.tar.gz
Add some casts to fix warnings
Diffstat (limited to 'rts/Task.h')
-rw-r--r--rts/Task.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/rts/Task.h b/rts/Task.h
index 7c9c86e40b..21a55dd242 100644
--- a/rts/Task.h
+++ b/rts/Task.h
@@ -291,10 +291,10 @@ INLINE_HEADER TaskId serialiseTaskId (OSThreadId taskID) {
#if defined(freebsd_HOST_OS) || defined(darwin_HOST_OS)
// Here OSThreadId is a pthread_t and pthread_t is a pointer, but within
// the process we can still use that pointer value as a unique id.
- return (TaskId) taskID
+ return (TaskId) (size_t) taskID
#else
// On Windows, Linux and others it's an integral type to start with.
- return taskID;
+ return (TaskId) taskID;
#endif
}
#endif
@@ -303,7 +303,11 @@ INLINE_HEADER TaskId serialiseTaskId (OSThreadId taskID) {
// Get a serialisable Id for the Task's OS thread
// Needed mainly for logging since the OSThreadId is an opaque type
INLINE_HEADER TaskId
-serialisableTaskId (Task *task STG_UNUSED)
+serialisableTaskId (Task *task
+#if !defined(THREADED_RTS)
+ STG_UNUSED
+#endif
+ )
{
#if defined(THREADED_RTS)
return serialiseTaskId(task->id);