This is an automated email from Gerrit.

"Ian Thompson <ia...@cadence.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/7141

-- gerrit

commit ea5e0915d66a57c043c180722b7530993a4ad200
Author: Ian Thompson <ia...@cadence.com>
Date:   Sun Aug 21 15:56:41 2022 -0700

    target/xtensa: fix clang analyzer warnings
    
    Scan-build of target/xtensa/ has no clang analyzer warnings from xtensa 
source files.
    
    Signed-off-by: Ian Thompson <ia...@cadence.com>
    Change-Id: I11a125c923ece9a6fd0d9ee1698f742f88ee5cab

diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c
index 4e18e3eb48..2fd2c7ca57 100644
--- a/src/target/xtensa/xtensa.c
+++ b/src/target/xtensa/xtensa.c
@@ -2608,6 +2608,7 @@ static int xtensa_gdbqc_qxtreg(struct target *target, 
const char *packet, char *
                goto xtensa_gdbqc_qxtreg_fail;
        }
        uint8_t regbuf[XT_QUERYPKT_RESP_MAX];
+       memset(regbuf, 0, XT_QUERYPKT_RESP_MAX);
        LOG_DEBUG("TIE reg 0x%08" PRIx32 " %s (%d bytes)", regnum, iswrite ? 
"write" : "read", reglen);
        if (reglen * 2 + 1 > XT_QUERYPKT_RESP_MAX) {
                LOG_ERROR("TIE register too large");
@@ -2990,6 +2991,7 @@ COMMAND_HELPER(xtensa_cmd_exe_do, struct target *target)
        }
 
        uint8_t ops[32];
+       memset(ops, 0, 32);
        unsigned int oplen = parm_len / 2;
        char encoded_byte[3] = { 0, 0, 0 };
        for (unsigned int i = 0; i < oplen; i++) {

-- 

Reply via email to