Skip to content

Commit 2129973

Browse files
committed
zephyr: firmware/single_loader: Fix compile warning
Fixes an issue of an unused function calling an undefined function Signed-off-by: Jamie McCrae <[email protected]>
1 parent a88e229 commit 2129973

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

boot/zephyr/firmware_loader.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ boot_image_validate(const struct flash_area *fa_p,
6262
}
6363
#endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/
6464

65+
#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE)
6566
inline static fih_ret
6667
boot_image_validate_once(const struct flash_area *fa_p,
6768
struct image_header *hdr)
@@ -92,6 +93,7 @@ boot_image_validate_once(const struct flash_area *fa_p,
9293
}
9394
FIH_RET(FIH_SUCCESS);
9495
}
96+
#endif
9597

9698
/**
9799
* Validates that an image in a slot is OK to boot.

boot/zephyr/single_loader.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ boot_image_validate(const struct flash_area *fa_p,
5858
}
5959
#endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/
6060

61+
#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE)
6162
inline static fih_ret
6263
boot_image_validate_once(const struct flash_area *fa_p,
6364
struct image_header *hdr)
@@ -88,6 +89,7 @@ boot_image_validate_once(const struct flash_area *fa_p,
8889
}
8990
FIH_RET(FIH_SUCCESS);
9091
}
92+
#endif
9193

9294
/**
9395
* Gather information on image and prepare for booting.

0 commit comments

Comments
 (0)