1 From 93acbc13cf271faf6025e96991eb3ab65062f90f Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
3 Date: Sat, 9 Mar 2024 09:35:24 +0100
4 Subject: [PATCH] fix compilation with clang
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
11 librz/analysis/p/analysis_xtensa.c | 3 ++-
12 1 file changed, 2 insertions(+), 1 deletion(-)
14 diff --git a/librz/analysis/p/analysis_xtensa.c b/librz/analysis/p/analysis_xtensa.c
15 index 4a32d2037c..f7331ae376 100644
16 --- a/librz/analysis/p/analysis_xtensa.c
17 +++ b/librz/analysis/p/analysis_xtensa.c
18 @@ -21,7 +21,8 @@ typedef struct {
19 static bool xtensa_init(void **user) {
20 XtensaContext *ctx = RZ_NEW0(XtensaContext);
21 rz_return_val_if_fail(ctx, false);
22 - memcpy(ctx->length_table, (int[16]){ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 }, sizeof(ctx->length_table));
23 + int temp_length_table[16] = { 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 8, 8 };
24 + memcpy(ctx->length_table, temp_length_table, sizeof(ctx->length_table));
25 ctx->insn_buffer = NULL;
26 ctx->slot_buffer = NULL;