From: Korey Sewell Date: Tue, 29 Mar 2011 23:36:36 +0000 (-0400) Subject: sim: typecast Tick to UTick for eventQ assert X-Git-Tag: stable_2012_02_02~438 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=473bc2197755bce925083a3d20ad0a1b4ef2e3fe;p=gem5.git sim: typecast Tick to UTick for eventQ assert --- diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh index e28c43bb7..8fbd1b2b1 100644 --- a/src/sim/eventq.hh +++ b/src/sim/eventq.hh @@ -486,6 +486,8 @@ class EventManager inline void EventQueue::schedule(Event *event, Tick when) { + // Typecasting Tick->Utick here since gcc + // complains about signed overflow assert((UTick)when >= (UTick)curTick()); assert(!event->scheduled()); assert(event->initialized()); @@ -523,7 +525,9 @@ EventQueue::deschedule(Event *event) inline void EventQueue::reschedule(Event *event, Tick when, bool always) { - assert(when >= curTick()); + // Typecasting Tick->Utick here since gcc + // complains about signed overflow + assert((UTick)when >= (UTick)curTick()); assert(always || event->scheduled()); assert(event->initialized());