--- tests/libmoduletestplugin_a.c
+++ tests/libmoduletestplugin_a.c
@@ -59,9 +59,10 @@
 G_MODULE_EXPORT void
 gplugin_a_module_func (GModule *module)
 {
-  void (*f) (void) = NULL;
+  gpointer fp = NULL;
+  void (*f) (void) = fp;
 
-  if (!g_module_symbol (module, "gplugin_say_boo_func", (gpointer *) &f))
+  if (!g_module_symbol (module, "gplugin_say_boo_func", &fp ))
     {
       g_print ("error: %s\n", g_module_error ());
       exit (1);
