qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c


From: Richard Henderson
Subject: Re: [PATCH v2 20/20] disas/nanomips: Rename nanomips.cpp to nanomips.c
Date: Mon, 5 Sep 2022 12:59:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/5/22 10:55, Milica Lazarevic wrote:
Now that everything is converted to the C code, nanomips.cpp file is
renamed to "nanomips.c". Therefore, meson.build file is also changed.

The explicit cast after the call to g_malloc() is no longer needed
because the file now compiles as a C code.

Signed-off-by: Milica Lazarevic <milica.lazarevic@syrmia.com>
---
  disas/meson.build                  | 2 +-
  disas/{nanomips.cpp => nanomips.c} | 6 +-----
  2 files changed, 2 insertions(+), 6 deletions(-)
  rename disas/{nanomips.cpp => nanomips.c} (99%)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

@@ -525,11 +525,7 @@ static const char *GPR(uint64 reg, struct Dis_info *info)
  static char *save_restore_list(uint64 rt, uint64 count, uint64 gp,
                                 struct Dis_info *info)
  {
-    /*
-     * Currently, this file compiles as a cpp file, so the explicit cast here
-     * is necessary. Later, the cast will be removed.
-     */
-    char *str = (char *)g_malloc(200);
+    char *str = g_malloc(200);

... noting that this change is obviated by the use of g_strjoinv.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]