From 09edf5e5f7f19109c51bb4d8ba7fb6a40b149d58 Mon Sep 17 00:00:00 2001 From: Andreas Klebinger Date: Wed, 25 Nov 2020 16:36:19 +0100 Subject: rts: EventLog.c: Properly cast (potential) 32bit pointers to uint64_t --- rts/eventlog/EventLog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index 824c554dcf..afd5a8171f 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -1490,7 +1490,8 @@ static void postTickyCounterDef(EventsBuf *eb, StgEntCounter *p) ensureRoomForVariableEvent(eb, len); postEventHeader(eb, EVENT_TICKY_COUNTER_DEF); postPayloadSize(eb, len); - postWord64(eb, (uint64_t) p); + + postWord64(eb, (uint64_t)((uintptr_t) p)); postWord16(eb, (uint16_t) p->arity); postString(eb, p->arg_kinds); postString(eb, p->str); @@ -1514,7 +1515,7 @@ static void postTickyCounterSample(EventsBuf *eb, StgEntCounter *p) ensureRoomForEvent(eb, EVENT_TICKY_COUNTER_SAMPLE); postEventHeader(eb, EVENT_TICKY_COUNTER_SAMPLE); - postWord64(eb, (uint64_t) p); + postWord64(eb, (uint64_t)((uintptr_t) p)); postWord64(eb, p->entry_count); postWord64(eb, p->allocs); postWord64(eb, p->allocd); -- cgit v1.2.1