Skip to content

Commit

Permalink
direct-xip : Do not compile boot_version_cmp when MCUBOOT_DIRECT_XIP_…
Browse files Browse the repository at this point in the history
…DOWNGRADE_ALLOWED is set

Avoid compilation warning about unused function.

Signed-off-by: Samuel MARTIN <[email protected]>
  • Loading branch information
smartin-vossloh committed Jan 12, 2024
1 parent 56333e3 commit f26d8f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ boot_check_header_erased(struct boot_loader_state *state, int slot)
return 0;
}

#if !defined(MCUBOOT_DIRECT_XIP_DOWNGRADE_ALLOWED)
#if (BOOT_IMAGE_NUMBER > 1) || \
defined(MCUBOOT_DIRECT_XIP) || \
defined(MCUBOOT_RAM_LOAD) || \
Expand Down Expand Up @@ -656,6 +657,7 @@ boot_version_cmp(const struct image_version *ver1,
return 0;
}
#endif
#endif

#if defined(MCUBOOT_DIRECT_XIP)
/**
Expand Down

0 comments on commit f26d8f4

Please sign in to comment.