Skip to content

Commit 9bd1a3d

Browse files
utzignvlsianpu
authored andcommitted
bootutil: fix unitialized variable warning
For some configurations, eg CONFIG_BOOT_DIRECT_XIP=y, fih_rc might never be initialized; initialize and fix warning. Signed-off-by: Fabio Utzig <[email protected]>
1 parent f48de7a commit 9bd1a3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boot/bootutil/src/loader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2207,7 +2207,7 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
22072207
uint32_t img_sz;
22082208
uint32_t img_loaded = 0;
22092209
#endif /* MCUBOOT_RAM_LOAD */
2210-
fih_int fih_rc;
2210+
fih_int fih_rc = FIH_FAILURE;
22112211

22122212
memset(state, 0, sizeof(struct boot_loader_state));
22132213

0 commit comments

Comments
 (0)