zephyr: firmware/single_loader: Fix compile warning
Fixes an issue of an unused function calling an undefined function
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
diff --git a/boot/zephyr/firmware_loader.c b/boot/zephyr/firmware_loader.c
index 38b121c..11b461c 100644
--- a/boot/zephyr/firmware_loader.c
+++ b/boot/zephyr/firmware_loader.c
@@ -62,6 +62,7 @@
}
#endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/
+#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE)
inline static fih_ret
boot_image_validate_once(const struct flash_area *fa_p,
struct image_header *hdr)
@@ -92,6 +93,7 @@
}
FIH_RET(FIH_SUCCESS);
}
+#endif
/**
* Validates that an image in a slot is OK to boot.