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 <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-12-11 07:52:48 -06:00 committed by Johan Hedberg
parent 0d1a6dc27f
commit 7defa02329
1 changed files with 2 additions and 2 deletions

View File

@ -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);