]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot/image-board.c: Silence warning in select_ramdisk
authorTom Rini <trini@konsulko.com>
Wed, 5 Apr 2023 23:48:56 +0000 (19:48 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 25 Apr 2023 19:31:27 +0000 (15:31 -0400)
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>
boot/image-board.c

index c602832249e311bade0a12e670c136c5d0b624d3..d500da1b4b918288a1f3f006028ddd4ef8717f6d 100644 (file)
@@ -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)) {