Skip to content

Commit 20896ba

Browse files
nashifgalak
authored andcommitted
thread analyzer: fix formatting for unsigned int
On 64bit systems, this was issuing warnings due to wrong formatting. Signed-off-by: Anas Nashif <[email protected]>
1 parent 12ba459 commit 20896ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/debug/thread_analyzer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ LOG_MODULE_REGISTER(thread_analyzer, CONFIG_THREAD_ANALYZER_LOG_LEVEL);
3737

3838
static void thread_print_cb(struct thread_analyzer_info *info)
3939
{
40-
unsigned int pcnt = (info->stack_used * 100U) / info->stack_size;
40+
size_t pcnt = (info->stack_used * 100U) / info->stack_size;
4141
#ifdef CONFIG_THREAD_RUNTIME_STATS
4242
THREAD_ANALYZER_PRINT(
4343
THREAD_ANALYZER_FMT(
44-
" %-20s: STACK: unused %zu usage %zu / %zu (%zu %%); CPU: %zu %%"),
44+
" %-20s: STACK: unused %zu usage %zu / %zu (%zu %%); CPU: %u %%"),
4545
THREAD_ANALYZER_VSTR(info->name),
4646
info->stack_size - info->stack_used, info->stack_used,
4747
info->stack_size, pcnt,

0 commit comments

Comments
 (0)