arch: x86: cast to the same size composite expression

Essential type of RHS operand (64 bit) is wider than essential
type of composite expression in LHS operand (32 bit).
LHS entry_val is 32 bit, and RHS (phys+offset) is 64 bit.
Cast RHS composite expression to the (pentry_t) type.

Found as a coding guideline violation (MISRA R10.7) by static
coding scanning tool.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This commit is contained in:
Maksim Masalski 2021-06-09 15:40:13 +08:00 committed by Anas Nashif
commit e96df40004

View file

@ -1038,7 +1038,7 @@ static void range_map_ptables(pentry_t *ptables, void *virt, uintptr_t phys,
if (zero_entry) {
entry_val = 0;
} else {
entry_val = (phys + offset) | entry_flags;
entry_val = (pentry_t)(phys + offset) | entry_flags;
}
page_map_set(ptables, dest_virt, entry_val, NULL, mask,