[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/19] target/ppc: Fix type conflict of GLib function pointers
From: |
Kohei Tokunaga |
Subject: |
[PATCH 08/19] target/ppc: Fix type conflict of GLib function pointers |
Date: |
Wed, 16 Apr 2025 17:14:13 +0900 |
On emscripten, function pointer casts can cause function call failure.
This commit fixes the function definition to match to the type of the
function call using g_slist_sort_with_data.
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
target/ppc/cpu_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index f81cb680fc..f03e48ba31 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7115,7 +7115,7 @@ PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass
*pcc)
}
/* Sort by PVR, ordering special case "host" last. */
-static gint ppc_cpu_list_compare(gconstpointer a, gconstpointer b)
+static gint ppc_cpu_list_compare(gconstpointer a, gconstpointer b, gpointer d)
{
ObjectClass *oc_a = (ObjectClass *)a;
ObjectClass *oc_b = (ObjectClass *)b;
@@ -7183,7 +7183,7 @@ void ppc_cpu_list(void)
qemu_printf("Available CPUs:\n");
list = object_class_get_list(TYPE_POWERPC_CPU, false);
- list = g_slist_sort(list, ppc_cpu_list_compare);
+ list = g_slist_sort_with_data(list, ppc_cpu_list_compare, NULL);
g_slist_foreach(list, ppc_cpu_list_entry, NULL);
g_slist_free(list);
--
2.25.1
- Re: [PATCH 01/19] hw/core/loader.c: Fix type conflict of GLib function pointers, (continued)
[PATCH 02/19] qom/object.c: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 03/19] system/vl.c: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 07/19] hw/net/can: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 04/19] target/arm/helper.c: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 05/19] target/i386/cpu.c: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 06/19] contrib/plugins: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 08/19] target/ppc: Fix type conflict of GLib function pointers,
Kohei Tokunaga <=
[PATCH 09/19] target/s390x: Fix type conflict of GLib function pointers, Kohei Tokunaga, 2025/04/16
[PATCH 12/19] block: Update block to compile with Emscripten, Kohei Tokunaga, 2025/04/16
- Re: [PATCH 12/19] block: Update block to compile with Emscripten, Philippe Mathieu-Daudé, 2025/04/16
- Re: [PATCH 12/19] block: Update block to compile with Emscripten, Philippe Mathieu-Daudé, 2025/04/16
- Re: [PATCH 12/19] block: Update block to compile with Emscripten, Kohei Tokunaga, 2025/04/17
- Re: [PATCH 12/19] block: Update block to compile with Emscripten, Philippe Mathieu-Daudé, 2025/04/17
- Re: [PATCH 12/19] block: Update block to compile with Emscripten, Kohei Tokunaga, 2025/04/18
- Re: [PATCH 12/19] block: Update block to compile with Emscripten, Philippe Mathieu-Daudé, 2025/04/18
Re: [PATCH 12/19] block: Update block to compile with Emscripten, Kohei Tokunaga, 2025/04/17
[PATCH 11/19] util/cacheflush.c: Update cache flushing mechanism for Emscripten, Kohei Tokunaga, 2025/04/16