This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 6e71527af2400a40bc4396f569f5972c4ede533c
Author: hujun5 <huj...@xiaomi.com>
AuthorDate: Tue Mar 28 19:21:17 2023 +0800

    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 <huj...@xiaomi.com>
---
 arch/arm64/src/common/arm64_arch_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/src/common/arm64_arch_timer.c 
b/arch/arm64/src/common/arm64_arch_timer.c
index 06489a3070..21fc07c3ad 100644
--- a/arch/arm64/src/common/arm64_arch_timer.c
+++ b/arch/arm64/src/common/arm64_arch_timer.c
@@ -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;
 }

Reply via email to