From ae829c0f35e6c3cf5e3d0dac38e63b6376204ac2 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 3 Jan 2022 12:57:16 +0100 Subject: 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 Link: https://lore.barebox.org/20220103115718.1723730-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- common/imx-bbu-nand-fcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3