From b7ad98378650e9ac53b1bf629c927ad7597a792f Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 29 Aug 2008 15:48:11 +0000 Subject: [PATCH] Silence a warning on 64bit platforms. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1752 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index 755b7f30..b8431b50 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -190,8 +190,13 @@ struct Process *proc_new_with_name(UNUSED_ARG(const char *, name), void (*entry) #endif // !ARCH_EMUL && !CONFIG_KERN_HEAP #if CONFIG_KERN_MONITOR - /* Fill-in the stack with a special marker to help debugging */ - memset(stack_base, CONFIG_KERN_STACKFILLCODE, stack_size); + /* + * Fill-in the stack with a special marker to help debugging. + * On 64bit platforms, CONFIG_KERN_STACKFILLCODE is larger + * than an int, so the (int) cast is required to silence the + * warning for truncating its size. + */ + memset(stack_base, (int)CONFIG_KERN_STACKFILLCODE, stack_size); #endif /* Initialize the process control block */ -- 2.25.1