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/single_loader.c b/boot/zephyr/single_loader.c
index 5d1e76f..75374d2 100644
--- a/boot/zephyr/single_loader.c
+++ b/boot/zephyr/single_loader.c
@@ -58,6 +58,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)
@@ -88,6 +89,7 @@
}
FIH_RET(FIH_SUCCESS);
}
+#endif
/**
* Gather information on image and prepare for booting.