Commit 7c4e641f authored by Daniel Leung's avatar Daniel Leung Committed by Fabio Baltieri
Browse files

debug: rename shadow variables



This renames the shadow variables found by -Wshadow.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 179c46be
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#define ZEPHYR_INCLUDE_DEBUG_STACK_H_

#include <zephyr/logging/log.h>
#include <zephyr/toolchain.h>
#include <stdbool.h>

static inline void log_stack_usage(const struct k_thread *thread)
@@ -20,7 +21,9 @@ static inline void log_stack_usage(const struct k_thread *thread)
#if defined(CONFIG_INIT_STACKS) && defined(CONFIG_THREAD_STACK_INFO)
	size_t unused, size = thread->stack_info.size;

	TOOLCHAIN_IGNORE_WSHADOW_BEGIN;
	LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
	TOOLCHAIN_IGNORE_WSHADOW_END;

	if (k_thread_stack_space_get(thread, &unused) == 0) {
		unsigned int pcnt = ((size - unused) * 100U) / size;