|
From: openocd-gerrit <ope...@us...> - 2023-05-13 08:48:23
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 160288137aad7dc8825566f2221dd24db7f81110 (commit)
from 329b10754aa2294d11717c461f356c174eba5094 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 160288137aad7dc8825566f2221dd24db7f81110
Author: Antonio Borneo <bor...@gm...>
Date: Mon May 8 10:45:25 2023 +0200
xtensa: fix build with gcc 13.1.1
New gcc does not understand that the variable 'restore_ms' is set
to 'true' only when the variable 'ms' is assigned in
static int xtensa_write_dirty_registers(...)
{
xtensa_reg_val_t ms;
bool restore_ms = false;
...
if (...) {
ms = regval;
restore_ms = true;
...
}
...
if (restore_ms) {
USE(ms);
}
...
}
and complains about possible use of uninitialized variable 'ms'.
Sadly initialize 'ms' to zero to hide this false positive.
Change-Id: I1fb3949070c8abbf4aa45a740f0ca2fdb753d4fa
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7681
Reviewed-by: Erhan Kurubas <erh...@es...>
Reviewed-by: Ian Thompson <ia...@ca...>
Tested-by: jenkins
diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c
index 63ffefce7..5880637f4 100644
--- a/src/target/xtensa/xtensa.c
+++ b/src/target/xtensa/xtensa.c
@@ -607,7 +607,7 @@ static int xtensa_write_dirty_registers(struct target *target)
xtensa_reg_val_t a3 = 0, woe;
unsigned int ms_idx = (xtensa->core_config->core_type == XT_NX) ?
xtensa->nx_reg_idx[XT_NX_REG_IDX_MS] : reg_list_size;
- xtensa_reg_val_t ms;
+ xtensa_reg_val_t ms = 0;
bool restore_ms = false;
LOG_TARGET_DEBUG(target, "start");
-----------------------------------------------------------------------
Summary of changes:
src/target/xtensa/xtensa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|