From: batt Date: Fri, 29 Aug 2008 15:48:11 +0000 (+0000) Subject: Silence a warning on 64bit platforms. X-Git-Tag: 2.0.0~182 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=b7ad98378650e9ac53b1bf629c927ad7597a792f;p=bertos.git Silence a warning on 64bit platforms. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1752 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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 */