arch: add comments to empty default case, add default LOG_ERR

According to the Zephyr Coding Guideline all switch statements
shall be well-formed.
Add a comment to the empty default case.
Add a LOG_ERR to the default case.

Found as a coding guideline violation (MISRA R16.1) by static
coding scanning tool.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This commit is contained in:
Maksim Masalski 2021-06-03 15:02:22 +08:00 committed by Anas Nashif
commit cbfd33f2ec
2 changed files with 4 additions and 0 deletions

View file

@ -285,6 +285,7 @@ static void log_exception(uintptr_t vector, uintptr_t code)
LOG_ERR("Security exception");
break;
default:
LOG_ERR("Exception not handled (code 0x%lx)", code);
break;
}
}

View file

@ -1906,6 +1906,9 @@ void arch_reserved_pages_update(void)
case X86_MEMMAP_ENTRY_DEFECTIVE:
__fallthrough;
default:
/* If any of three above cases satisfied, exit switch
* and mark page reserved
*/
break;
}