tests: disable deprecation warnings for tests
[platform/upstream/glib.git] / tests / libmoduletestplugin_a.c
index 33d0635..150d50d 100644 (file)
@@ -24,6 +24,9 @@
  * GLib at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
+#undef G_DISABLE_ASSERT
+#undef G_LOG_DOMAIN
+
 #include       <gmodule.h>
 #include       <stdlib.h>
 
@@ -56,13 +59,13 @@ gplugin_say_boo_func (void)
 G_MODULE_EXPORT void
 gplugin_a_module_func (GModule *module)
 {
-  void (*f) (void) = NULL;
+  void *f = NULL;
 
-  if (!g_module_symbol (module, "gplugin_say_boo_func", (gpointer) &f))
+  if (!g_module_symbol (module, "gplugin_say_boo_func", &f ))
     {
       g_print ("error: %s\n", g_module_error ());
       exit (1);
     }
 
-  f ();
+  ((void(*)(void)) f) ();
 }