Fix a syntax error in sim/common/cgen-mem.h

Message ID 925651946.9986943.1736512587814.JavaMail.zimbra@inria.fr
State New
Headers
Series Fix a syntax error in sim/common/cgen-mem.h |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed

Commit Message

Ella Ma Jan. 10, 2025, 12:36 p.m. UTC
  Hi,

When using our static analyzer to scan the code of GDB, we found that
file sim/common/cgen-mem.h may have a syntax error where a closing
parenthesis is missing.

Please refer to commit 2d922d86bac7b51bfe8e45ed4c8aa7af37010ead
which introduces this line.


ella

------

Raw output of `git format-patch` is attached and also pasted as follows:

From fad03bda51604e31dc292471bc31b4f410aed9e2 Mon Sep 17 00:00:00 2001
From: Ella MA <xutong.ma@inria.fr>
Date: Fri, 10 Jan 2025 13:15:33 +0100
Subject: [PATCH] Fix a syntax error in sim/common/cgen-mem.h

---
 sim/common/cgen-mem.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tom Tromey Jan. 14, 2025, 4:10 p.m. UTC | #1
>>>>> Ella Ma <xutong.ma@inria.fr> writes:

> When using our static analyzer to scan the code of GDB, we found that
> file sim/common/cgen-mem.h may have a syntax error where a closing
> parenthesis is missing.

> Please refer to commit 2d922d86bac7b51bfe8e45ed4c8aa7af37010ead
> which introduces this line.

Thanks for the patch.  I'm going to push it momentarily.

Tom
  

Patch

diff --git a/sim/common/cgen-mem.h b/sim/common/cgen-mem.h
index 485a6963d12..c59bd9fb239 100644
--- a/sim/common/cgen-mem.h
+++ b/sim/common/cgen-mem.h
@@ -169,7 +169,7 @@  XCONCAT2 (SETMEM,mode) (SIM_CPU *cpu, IADDR pc, ADDR a, mode val) \
   XCONCAT2 (sim_core_write_unaligned_,size) (cpu, pc, write_map, a, val); \
 }
 #else
-#define DECLARE_SETMEM(mode, size) DECLARE_SETMEM_EXTERN (mode, size
+#define DECLARE_SETMEM(mode, size) DECLARE_SETMEM_EXTERN (mode, size)
 #endif
 
 DECLARE_SETMEM (SF, 4) /* TAGS: SETMEMSF */