From 7defa023290c405ca253dd15a3181c46be21c318 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 11 Dec 2020 07:52:48 -0600 Subject: [PATCH] x86: Fix compiler warning in z_x86_dump_mmu_flags Fix compiler warnings associated with 'level' and 'entry' variables 'may be used uninitialized in this function' Signed-off-by: Kumar Gala --- arch/x86/core/x86_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/core/x86_mmu.c b/arch/x86/core/x86_mmu.c index 63520736420..5413a6fe8a6 100644 --- a/arch/x86/core/x86_mmu.c +++ b/arch/x86/core/x86_mmu.c @@ -686,8 +686,8 @@ void z_x86_pentry_get(int *paging_level, pentry_t *val, pentry_t *ptables, */ void z_x86_dump_mmu_flags(pentry_t *ptables, void *virt) { - pentry_t entry; - int level; + pentry_t entry = 0; + int level = 0; pentry_get(&level, &entry, ptables, virt);