fix(clang): fix performance-no-int-to-ptr
Allow the cast from an address originating from a p_addr since
these don't suffer from the ptr -> int -> ptr conversions the check
is trying to prevent.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: I24a7a29fd70599c065d74248dd7fc4cc5c28fa11
diff --git a/src/manifest.c b/src/manifest.c
index 1d2d37a..6f366e2 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -811,6 +811,9 @@
}
sp_dtb_addr = pa_add(sp_pkg_start, sp_pkg->pm_offset);
+
+ /* Since the address is from pa_addr allow the cast */
+ // NOLINTNEXTLINE(performance-no-int-to-ptr)
if (!fdt_init_from_ptr(&sp_fdt, (void *)pa_addr(sp_dtb_addr),
sp_pkg->pm_size)) {
dlog_error("FDT failed validation.\n");