remove suspicious cast that could maybe cause an overflow (#4169)
* suspicious cast * don't print 64b * explicit type
This commit is contained in:
parent
16e5ffb2f6
commit
9b820cf1dc
|
@ -67,11 +67,12 @@ void SingleTimerExecutor::scheduleByTimestampNt(const char *msg, scheduling_s* s
|
|||
ScopePerf perf(PE::SingleTimerExecutorScheduleByTimestamp);
|
||||
|
||||
#if EFI_ENABLE_ASSERTS
|
||||
int32_t deltaTimeNt = (int32_t)nt - getTimeNowLowerNt();
|
||||
efitick_t deltaTimeNt = nt - getTimeNowLowerNt();
|
||||
|
||||
if (deltaTimeNt >= TOO_FAR_INTO_FUTURE_NT) {
|
||||
// we are trying to set callback for too far into the future. This does not look right at all
|
||||
firmwareError(CUSTOM_ERR_TASK_TIMER_OVERFLOW, "scheduleByTimestampNt() too far: %d %s", deltaTimeNt, msg);
|
||||
int32_t intDeltaTimeNt = (int32_t)deltaTimeNt;
|
||||
firmwareError(CUSTOM_ERR_TASK_TIMER_OVERFLOW, "scheduleByTimestampNt() too far: %d %s", intDeltaTimeNt, msg);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue