gdbus-test-codegen: Cast to void* to printf "%p"

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
This commit is contained in:
Daniel Boles 2018-01-01 16:12:37 +00:00
parent 54b04f74bd
commit b441c21a09

View File

@ -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;