|
From: openocd-gerrit <ope...@us...> - 2026-09-12 08:06:56
|
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 0cc2812da831c57a4cc51f8f2f24de2ad8f324b4 (commit)
from bedefa238476ad852b1fafd927230e38e2092282 (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 0cc2812da831c57a4cc51f8f2f24de2ad8f324b4
Author: Tomas Vanek <va...@fb...>
Date: Fri Sep 4 07:23:51 2026 +0200
target/riscv: fix compilation on old gcc
gcc 4.8.4 complains
src/target/riscv/riscv-013.c:349:16: error: missing initializer
for field 'XLEN' of 'const struct riscv_debug_reg_ctx'
[-Werror=missing-field-initializers]
const struct riscv_debug_reg_ctx default_context = {0};
^
because struct riscv_debug_reg_ctx contains 3 sub-structs.
Initialize one sub-struct to make gcc happy.
Change-Id: I58dc2544a9a6be91f3dbe5a5b700350ede71afb7
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9956
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 449175634..96033af6f 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -346,7 +346,9 @@ static void riscv013_dm_free(struct target *target)
static struct riscv_debug_reg_ctx get_riscv_debug_reg_ctx(const struct target *target)
{
if (!target_was_examined(target)) {
- const struct riscv_debug_reg_ctx default_context = {0};
+ const struct riscv_debug_reg_ctx default_context = {
+ .XLEN = { 0 }
+ };
return default_context;
}
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv-013.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
Main OpenOCD repository
|