From e502e804672bdf79d9051fd47fcfd4b01eccaeeb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 5 May 2026 12:35:23 -0500 Subject: [PATCH] bsps/riscv/shared/fdt/riscv-fdt.c: Fix may be uniitialized warning The variables start and size were used in the return statement even if none of the if's set them. Defaulted them to zero which results in returning NULL on error which was expected anyway. --- bsps/riscv/shared/fdt/riscv-fdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsps/riscv/shared/fdt/riscv-fdt.c b/bsps/riscv/shared/fdt/riscv-fdt.c index 31580c5092..b0fc08a366 100644 --- a/bsps/riscv/shared/fdt/riscv-fdt.c +++ b/bsps/riscv/shared/fdt/riscv-fdt.c @@ -49,8 +49,8 @@ void *riscv_fdt_get_end_of_memory( const void *fdt ) int ac; int sc; int len; - uintptr_t start; - uintptr_t size; + uintptr_t start = 0; + uintptr_t size = 0; node = fdt_path_offset( fdt, "/memory" );