This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7207

-- gerrit

commit eb4498f1d8ef8a071490b157d95535d41b93c971
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Mon Sep 19 14:55:55 2022 +0200

    target/riscv: fix unused initialization
    
    Scan-build reports:
            Unused code: Dead assignment
            riscv.c:716 Value stored to 'result' is never read
    
    Remove the initialization of variable 'result'.
    
    Change-Id: Ied67bb4fcfa5bace186522074247ead43a5d5cd5
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index dde3d7e696..c25efcde9a 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -713,7 +713,6 @@ static int add_trigger(struct target *target, struct 
trigger *trigger)
                        return result;
                int type = get_field(tdata1, MCONTROL_TYPE(riscv_xlen(target)));
 
-               result = ERROR_OK;
                switch (type) {
                        case 1:
                                result = maybe_add_trigger_t1(target, trigger, 
tdata1);

-- 

Reply via email to