Skip to content

Commit 7104877

Browse files
committed
[nrf fromlist] mgmt: mcumgr: grp: os_mgmt: Fix compilation warning
This is a follow up to commit 770482a. Add initialization of the `ok` variable to prevent the "may be uninitialized" warning when `CONFIG_BOOTLOADER_MCUBOOT` is not defined. Upstream PR #: 84101 Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 451bc4c commit 7104877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/mgmt/mcumgr/grp/os_mgmt/src/os_mgmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ os_mgmt_bootloader_info(struct smp_streamer *ctxt)
450450
zcbor_state_t *zsd = ctxt->reader->zs;
451451
struct zcbor_string query = { 0 };
452452
size_t decoded;
453-
bool ok;
453+
bool ok = true;
454454
bool has_output = false;
455455

456456
#if defined(CONFIG_MCUMGR_GRP_OS_BOOTLOADER_INFO_HOOK)

0 commit comments

Comments
 (0)