From daee37d377197d3469fd45512f1aacaeca391dd9 Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Sun, 31 Mar 2024 20:57:32 +0200 Subject: [PATCH] drivers: tap_esc: fix Werror=maybe-uninitialized compilation --- src/drivers/tap_esc/tap_esc_uploader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/tap_esc/tap_esc_uploader.cpp b/src/drivers/tap_esc/tap_esc_uploader.cpp index 03b3b84c50..350e366b73 100644 --- a/src/drivers/tap_esc/tap_esc_uploader.cpp +++ b/src/drivers/tap_esc/tap_esc_uploader.cpp @@ -163,7 +163,7 @@ int TAP_ESC_UPLOADER::upload_id(uint8_t esc_id, int32_t fw_size) /****************************************** * second: get device bootloader revision ******************************************/ - uint32_t bl_rev; + uint32_t bl_rev = 0; ret = get_device_info(esc_id, PROTO_GET_DEVICE, PROTO_DEVICE_BL_REV, bl_rev); if (ret == OK) { @@ -390,7 +390,7 @@ int TAP_ESC_UPLOADER::checkcrc(const char *filenames[]) return -EIO; } - uint32_t temp_revision; + uint32_t temp_revision = 0; /* get device bootloader revision */ ret = get_device_info(esc_id, PROTO_GET_DEVICE, PROTO_DEVICE_BL_REV, temp_revision); @@ -1098,7 +1098,7 @@ int TAP_ESC_UPLOADER::verify_crc(uint8_t esc_id, size_t fw_size_local) uint32_t sum = 0; uint32_t bytes_read = 0; uint32_t crc = 0; - uint32_t fw_size_remote; + uint32_t fw_size_remote = 0; uint8_t fill_blank = 0xff; file_buf = new uint8_t[PROG_MULTI_MAX];