Skip to content

Commit

Permalink
Fix unused variable
Browse files Browse the repository at this point in the history
Signed-off-by: INFINEON\DovhalA <Artem.Dovhal@infineon.com>
  • Loading branch information
DOAR-Infineon committed Jul 10, 2023
1 parent 08400e9 commit c7e0cb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions boot/bootutil/include/bootutil/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ struct image_tlv {
#define IS_RAM_BOOTABLE(hdr) (false)
#endif

#if defined(MCUBOOT_RAM_LOAD) || defined(MCUBOOT_DIRECT_XIP)
#define IS_RAM_BOOT_STAGE() \
({ \
extern bool boot_ram; \
boot_ram; \
})
#else
#define IS_RAM_BOOT_STAGE() false
#endif

_Static_assert(sizeof(struct image_header) == IMAGE_HEADER_SIZE,
"struct image_header not required size");
Expand Down
3 changes: 3 additions & 0 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
BOOT_LOG_MODULE_DECLARE(mcuboot);

static struct boot_loader_state boot_data;

#if defined(MCUBOOT_RAM_LOAD) || defined(MCUBOOT_DIRECT_XIP)
static bool boot_ram = false;
#endif

#if (BOOT_IMAGE_NUMBER > 1)
#define IMAGES_ITER(x) for ((x) = 0; (x) < BOOT_IMAGE_NUMBER; ++(x))
Expand Down

0 comments on commit c7e0cb7

Please sign in to comment.