From b441c21a09db52db0af715e1d702c765ae38346e Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Mon, 1 Jan 2018 16:12:37 +0000 Subject: [PATCH] gdbus-test-codegen: Cast to void* to printf "%p" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to suppress a compiler error with stricter warnings enabled (GCC): gdbus-test-codegen.c: In function ‘on_handle_get_self’: gdbus-test-codegen.c:403:26: error: format ‘%p’ expects argument of type ‘void *’, but argument 2 has type ‘GThread * {aka struct _GThread *}’ [-Werror=format=] s = g_strdup_printf ("%p", g_thread_self ()); https://bugzilla.gnome.org/show_bug.cgi?id=792099 --- gio/tests/gdbus-test-codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c index c974d2058..1c4e83c4c 100644 --- a/gio/tests/gdbus-test-codegen.c +++ b/gio/tests/gdbus-test-codegen.c @@ -405,7 +405,7 @@ on_handle_get_self (FooiGenMethodThreads *object, gpointer user_data) { gchar *s; - s = g_strdup_printf ("%p", g_thread_self ()); + s = g_strdup_printf ("%p", (void *)g_thread_self ()); foo_igen_method_threads_complete_get_self (object, invocation, s); g_free (s); return TRUE;