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/+/7050

-- gerrit

commit 243eb06791bc1f2f08b3edf2605487fe98dd9208
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Sat Jun 25 12:40:24 2022 +0200

    target: esp_xtensa_smp: fix clang report
    
    The variable 'smp_break' is only set and used in case of smp.
    But clang cannot track if 'target->smp' get modified between the
    set and the use of 'smp_break', so it consider possible to use
    'smp_break' uninitialized.
    
    Initialize 'smp_break' to silent clang.
    
    Change-Id: Ifa25a84fe9ffa25b8b58d7920ec77994c3b7ebfe
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/target/espressif/esp_xtensa_smp.c 
b/src/target/espressif/esp_xtensa_smp.c
index 1c36a295a9..d51906befd 100644
--- a/src/target/espressif/esp_xtensa_smp.c
+++ b/src/target/espressif/esp_xtensa_smp.c
@@ -386,7 +386,7 @@ int esp_xtensa_smp_step(struct target *target,
        int handle_breakpoints)
 {
        int res;
-       uint32_t smp_break;
+       uint32_t smp_break = 0;
        struct esp_xtensa_smp_common *esp_xtensa_smp = 
target_to_esp_xtensa_smp(target);
 
        if (target->smp) {

-- 

Reply via email to