This is an automated email from Gerrit.

Tarek BOCHKATI ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/6013

-- gerrit

commit f1b047bccc2712b0f57d06e87bff7c12a90ee451
Author: Tarek BOCHKATI <[email protected]>
Date:   Mon Jan 11 19:23:58 2021 +0100

    target/riscv: fix build error with -Werror=maybe-uninitialized
    
    using gcc 9.3 on ubuntu focal fossa with -Werror=maybe-uninitialized
    we get this error:
      /src/target/riscv/riscv.c: In function ‘riscv_address_translate’:
      /src/target/riscv/riscv.c:1536:13: error: ‘pte’ may be used uninitialized
    
    Change-Id: I51e180b43f9b6996e4e4058db49c179b9f81bcdc
    Signed-off-by: Tarek BOCHKATI <[email protected]>

diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 0d1cee1..c26e635 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -1446,7 +1446,7 @@ static int riscv_address_translate(struct target *target,
        uint64_t ppn_value;
        target_addr_t table_address;
        virt2phys_info_t *info;
-       uint64_t pte;
+       uint64_t pte = 0;
        int i;
 
        if (riscv_rtos_enabled(target))

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to