arch/arm64: 64 bit platform compile error reported

compile error log:
common/arm64_arch_timer.c: In function 'arm64_tick_max_delay':
common/arm64_arch_timer.c:178:12: error: conversion from 'long unsigned int' to 'clock_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Werror=overflow]
  178 |   *ticks = UINT64_MAX;
      |            ^~~~~~~~~~

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2023-03-28 19:21:17 +08:00 committed by Alin Jerpelea
parent 7f4cb3057a
commit 6e71527af2

View File

@ -175,7 +175,7 @@ static int arm64_tick_max_delay(struct oneshot_lowerhalf_s *lower,
{
DEBUGASSERT(ticks != NULL);
*ticks = UINT64_MAX;
*ticks = (clock_t)UINT64_MAX;
return OK;
}