summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-01-03 12:57:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-01-05 08:28:37 +0100
commitae829c0f35e6c3cf5e3d0dac38e63b6376204ac2 (patch)
treeaf5eda521cca557c60a8eb2dc303bad21b2c9a66 /common
parent5f134bc7401d6af7c16a0f9bb09284053c53992d (diff)
downloadbarebox-ae829c0f35e6c3cf5e3d0dac38e63b6376204ac2.tar.gz
barebox-ae829c0f35e6c3cf5e3d0dac38e63b6376204ac2.tar.xz
imx-bbu-nand-fcb: suppress compiler warning about uninitialized use
fw_orig_len is selectively initialized in read_firmware_all. In case it's left uninitialized, fw_orig will keep it's initial value of NULL. fw_orig is checked before fw_orig_len use, so there is no use of an uninitialized variable in practice, but GCC 11.1.1 warns about it anyway. Give it an initial value of 0 to silence the warning. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103115718.1723730-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/imx-bbu-nand-fcb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 3b07d539ee..bde0b227f8 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -1155,7 +1155,7 @@ static int imx_bbu_nand_update(struct bbu_handler *handler, struct bbu_data *dat
enum filetype filetype;
unsigned num_blocks_fw, fw_size;
int used = 0;
- int fw_orig_len;
+ int fw_orig_len = 0;
int used_refresh = 0, unused_refresh = 0;
if (data->image) {