From: Tom Rini <trini@konsulko.com>
Date: Wed, 5 Apr 2023 23:48:56 +0000 (-0400)
Subject: boot/image-board.c: Silence warning in select_ramdisk
X-Git-Tag: v2025.01-rc5-pxa1908~1028^2~15
X-Git-Url: http://git.dujemihanovic.xyz/img/html/index.html?a=commitdiff_plain;h=51a765b37671b4460fdefef5000b9eb6988fddc8;p=u-boot.git

boot/image-board.c: Silence warning in select_ramdisk

When building with clang we get a warning that rdaddr could be
uninitialized in one case. While this cannot functionally happen, we can
easily silence the warning.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/boot/image-board.c b/boot/image-board.c
index c602832249..d500da1b4b 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -328,7 +328,7 @@ static int select_ramdisk(struct bootm_headers *images, const char *select, u8 a
 	bool done_select = !select;
 	bool done = false;
 	int rd_noffset;
-	ulong rd_addr;
+	ulong rd_addr = 0;
 	char *buf;
 
 	if (CONFIG_IS_ENABLED(FIT)) {