On 27/10/2025 22:12, Dmytro Prokopchuk1 wrote:
> MISRA C Rule 11.3 prohibits casting between pointer-to-object types that
> are different types. The original code used a macro 'NextMemoryDescriptor()'
> that performed a non-compliant cast from 'UINT8*' to 'EFI_MEMORY_DESCRIPTOR*'.
> 
> Change 'efi_process_memory_map_bootinfo()' function parameter from
> 'EFI_MEMORY_DESCRIPTOR *' to 'void *' for the memory map parameter. Replace
> usage of 'NextMemoryDescriptor()' macro with compliant pointer arithmetic
> on 'void *', followed by a single compliant cast to 'EFI_MEMORY_DESCRIPTOR *'.
> 
> Signed-off-by: Dmytro Prokopchuk <[email protected]>
Reviewed-by: Michal Orzel <[email protected]>

~Michal


Reply via email to