diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-01-03 12:57:16 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-01-05 08:28:37 +0100 |
commit | ae829c0f35e6c3cf5e3d0dac38e63b6376204ac2 (patch) | |
tree | af5eda521cca557c60a8eb2dc303bad21b2c9a66 | |
parent | 5f134bc7401d6af7c16a0f9bb09284053c53992d (diff) | |
download | barebox-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>
-rw-r--r-- | common/imx-bbu-nand-fcb.c | 2 |
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) { |