From 1dc774a653e992e1153fbed16f90097fa8db467f Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Mon, 15 Oct 2012 12:00:51 -0400 Subject: [PATCH] Remove g_type_init() calls Very many testcases, some GLib tools (resource compiler, etc) and GApplication were calling g_type_init(). Remove those uses, as they are no longer required. https://bugzilla.gnome.org/show_bug.cgi?id=686161 --- gio/gapplication.c | 4 ---- gio/gdbus-tool.c | 2 -- gio/gdbusaddress.c | 2 -- gio/gio-querymodules.c | 2 -- gio/glib-compile-resources.c | 2 -- gio/gresource-tool.c | 2 -- gio/gsettings-tool.c | 2 -- gio/tests/actions.c | 1 - gio/tests/appinfo.c | 1 - gio/tests/async-close-output-stream.c | 2 -- gio/tests/buffered-input-stream.c | 1 - gio/tests/buffered-output-stream.c | 2 -- gio/tests/cancellable.c | 1 - gio/tests/contenttype.c | 2 -- gio/tests/contexts.c | 1 - gio/tests/converter-stream.c | 1 - gio/tests/data-input-stream.c | 1 - gio/tests/data-output-stream.c | 1 - gio/tests/desktop-app-info.c | 1 - gio/tests/echo-server.c | 2 -- gio/tests/file.c | 2 -- gio/tests/fileattributematcher.c | 2 -- gio/tests/filter-cat.c | 2 -- gio/tests/filter-streams.c | 1 - gio/tests/g-file-info.c | 1 - gio/tests/g-file.c | 1 - gio/tests/g-icon.c | 1 - gio/tests/gapplication-example-cmdline2.c | 2 -- gio/tests/gapplication-example-dbushooks.c | 2 -- gio/tests/gapplication.c | 2 -- gio/tests/gdbus-addresses.c | 1 - gio/tests/gdbus-auth.c | 1 - gio/tests/gdbus-bz627724.c | 1 - gio/tests/gdbus-close-pending.c | 1 - gio/tests/gdbus-connection-flush-helper.c | 2 -- gio/tests/gdbus-connection-flush.c | 1 - gio/tests/gdbus-connection-loss.c | 1 - gio/tests/gdbus-connection-slow.c | 1 - gio/tests/gdbus-connection.c | 1 - gio/tests/gdbus-daemon.c | 2 -- gio/tests/gdbus-error.c | 1 - gio/tests/gdbus-example-export.c | 2 -- gio/tests/gdbus-example-objectmanager-client.c | 2 -- gio/tests/gdbus-example-objectmanager-server.c | 2 -- gio/tests/gdbus-example-own-name.c | 2 -- gio/tests/gdbus-example-peer.c | 2 -- gio/tests/gdbus-example-server.c | 2 -- gio/tests/gdbus-example-subtree.c | 2 -- gio/tests/gdbus-example-unix-fd-client.c | 2 -- gio/tests/gdbus-example-watch-name.c | 2 -- gio/tests/gdbus-example-watch-proxy.c | 2 -- gio/tests/gdbus-exit-on-close.c | 1 - gio/tests/gdbus-export.c | 1 - gio/tests/gdbus-introspection.c | 1 - gio/tests/gdbus-message.c | 1 - gio/tests/gdbus-names.c | 1 - gio/tests/gdbus-non-socket.c | 1 - gio/tests/gdbus-peer.c | 1 - gio/tests/gdbus-proxy-threads.c | 1 - gio/tests/gdbus-proxy-well-known-name.c | 1 - gio/tests/gdbus-proxy.c | 1 - gio/tests/gdbus-serialization.c | 1 - gio/tests/gdbus-test-codegen.c | 1 - gio/tests/gdbus-threading.c | 1 - gio/tests/gmenumodel.c | 1 - gio/tests/gschema-compile.c | 1 - gio/tests/gsettings.c | 1 - gio/tests/httpd.c | 2 -- gio/tests/inet-address.c | 1 - gio/tests/io-stream.c | 1 - gio/tests/live-g-file.c | 1 - gio/tests/memory-input-stream.c | 1 - gio/tests/memory-output-stream.c | 1 - gio/tests/mimeapps.c | 1 - gio/tests/network-address.c | 2 -- gio/tests/network-monitor.c | 2 -- gio/tests/permission.c | 1 - gio/tests/pollable.c | 1 - gio/tests/proxy-test.c | 1 - gio/tests/proxy.c | 2 -- gio/tests/readwrite.c | 1 - gio/tests/resolver.c | 2 -- gio/tests/resources.c | 1 - gio/tests/send-data.c | 2 -- gio/tests/simple-async-result.c | 1 - gio/tests/sleepy-stream.c | 1 - gio/tests/socket-client.c | 2 -- gio/tests/socket-server.c | 2 -- gio/tests/socket.c | 1 - gio/tests/srvtarget.c | 1 - gio/tests/task.c | 1 - gio/tests/tls-certificate.c | 1 - gio/tests/tls-interaction.c | 1 - gio/tests/unix-fd.c | 2 -- gio/tests/unix-streams.c | 1 - gio/tests/vfs.c | 1 - gio/tests/volumemonitor.c | 2 -- gio/tests/win32-streams.c | 1 - gobject/gobject-query.c | 2 -- gobject/gvalue.c | 2 -- gobject/testgobject.c | 1 - gobject/tests/binding.c | 1 - gobject/tests/boxed.c | 1 - gobject/tests/dynamictests.c | 1 - gobject/tests/enums.c | 1 - gobject/tests/ifaceproperties.c | 2 -- gobject/tests/param.c | 1 - gobject/tests/properties.c | 1 - gobject/tests/qdata.c | 2 +- gobject/tests/reference.c | 2 -- gobject/tests/signals.c | 2 -- gobject/tests/threadtests.c | 1 - gobject/tests/valuearray.c | 2 -- tests/gio-ls.c | 2 -- tests/gobject/accumulator.c | 1 - tests/gobject/defaultiface.c | 1 - tests/gobject/dynamictype.c | 1 - tests/gobject/gvalue-test.c | 1 - tests/gobject/ifacecheck.c | 2 -- tests/gobject/ifaceinherit.c | 1 - tests/gobject/ifaceinit.c | 1 - tests/gobject/override.c | 1 - tests/gobject/paramspec-test.c | 1 - tests/gobject/performance-threaded.c | 2 -- tests/gobject/performance.c | 2 -- tests/gobject/references.c | 1 - tests/gobject/singleton.c | 2 +- tests/refcount/closures.c | 1 - tests/refcount/objects.c | 1 - tests/refcount/objects2.c | 1 - tests/refcount/properties.c | 1 - tests/refcount/properties2.c | 3 +-- tests/refcount/properties3.c | 1 - tests/refcount/properties4.c | 1 - tests/refcount/signals.c | 1 - tests/timeloop-closure.c | 2 -- 136 files changed, 3 insertions(+), 189 deletions(-) diff --git a/gio/gapplication.c b/gio/gapplication.c index cb6ad76..91d7b4f 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -959,8 +959,6 @@ g_application_id_is_valid (const gchar *application_id) * * Creates a new #GApplication instance. * - * This function calls g_type_init() for you. - * * If non-%NULL, the application id must be valid. See * g_application_id_is_valid(). * @@ -975,8 +973,6 @@ g_application_new (const gchar *application_id, { g_return_val_if_fail (application_id == NULL || g_application_id_is_valid (application_id), NULL); - g_type_init (); - return g_object_new (G_TYPE_APPLICATION, "application-id", application_id, "flags", flags, diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c index a684c7a..6c4f3b1 100644 --- a/gio/gdbus-tool.c +++ b/gio/gdbus-tool.c @@ -1948,8 +1948,6 @@ main (gint argc, gchar *argv[]) completion_cur = NULL; completion_prev = NULL; - g_type_init (); - if (argc < 2) { usage (&argc, &argv, FALSE); diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c index 9ea1e75..f8b2c72 100644 --- a/gio/gdbusaddress.c +++ b/gio/gdbusaddress.c @@ -1333,8 +1333,6 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow if (g_getenv ("GDBUS_DAEMON_DEBUG") != NULL) open_console_window (); - g_type_init (); - loop = g_main_loop_new (NULL, FALSE); address = "nonce-tcp:"; diff --git a/gio/gio-querymodules.c b/gio/gio-querymodules.c index 0ebc850..f445831 100644 --- a/gio/gio-querymodules.c +++ b/gio/gio-querymodules.c @@ -129,8 +129,6 @@ main (gint argc, { int i; - g_type_init (); - if (argc == 1) { g_print ("Usage: gio-querymodules [ ...]\n"); diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c index ff97c67..f8ac652 100644 --- a/gio/glib-compile-resources.c +++ b/gio/glib-compile-resources.c @@ -641,8 +641,6 @@ main (int argc, char **argv) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif - g_type_init (); - context = g_option_context_new (N_("FILE")); g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); g_option_context_set_summary (context, diff --git a/gio/gresource-tool.c b/gio/gresource-tool.c index 70c9ee6..b38e407 100644 --- a/gio/gresource-tool.c +++ b/gio/gresource-tool.c @@ -602,8 +602,6 @@ main (int argc, char *argv[]) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif - g_type_init (); - if (argc < 2) return cmd_help (FALSE, NULL); diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c index bcf3988..764c3d7 100644 --- a/gio/gsettings-tool.c +++ b/gio/gsettings-tool.c @@ -772,8 +772,6 @@ main (int argc, char **argv) else return gsettings_help (FALSE, argv[1]); - g_type_init (); - if (argc > 2) { gchar **parts; diff --git a/gio/tests/actions.c b/gio/tests/actions.c index e808bef..74bcd9a 100644 --- a/gio/tests/actions.c +++ b/gio/tests/actions.c @@ -833,7 +833,6 @@ test_bug679509 (void) int main (int argc, char **argv) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/actions/basic", test_basic); diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c index 3cbd0f1..9151252 100644 --- a/gio/tests/appinfo.c +++ b/gio/tests/appinfo.c @@ -379,7 +379,6 @@ test_from_keyfile (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/appinfo/basic", test_basic); diff --git a/gio/tests/async-close-output-stream.c b/gio/tests/async-close-output-stream.c index 53018a7..507214c 100644 --- a/gio/tests/async-close-output-stream.c +++ b/gio/tests/async-close-output-stream.c @@ -247,8 +247,6 @@ main (int argc, { SetupData *data; - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gio/tests/buffered-input-stream.c b/gio/tests/buffered-input-stream.c index 82604db..c94ca10 100644 --- a/gio/tests/buffered-input-stream.c +++ b/gio/tests/buffered-input-stream.c @@ -372,7 +372,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gio/tests/buffered-output-stream.c b/gio/tests/buffered-output-stream.c index d20f319..c510a12 100644 --- a/gio/tests/buffered-output-stream.c +++ b/gio/tests/buffered-output-stream.c @@ -307,8 +307,6 @@ test_truncate(void) int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/buffered-output-stream/write", test_write); diff --git a/gio/tests/cancellable.c b/gio/tests/cancellable.c index bd2958b..deadb38 100644 --- a/gio/tests/cancellable.c +++ b/gio/tests/cancellable.c @@ -221,7 +221,6 @@ test_cancel_multiple_concurrent (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/cancellable/multiple-concurrent", test_cancel_multiple_concurrent); diff --git a/gio/tests/contenttype.c b/gio/tests/contenttype.c index c44bcc2..ec46be4 100644 --- a/gio/tests/contenttype.c +++ b/gio/tests/contenttype.c @@ -203,8 +203,6 @@ test_icon (void) int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/contenttype/guess", test_guess); diff --git a/gio/tests/contexts.c b/gio/tests/contexts.c index fd5cd1a..14175b4 100644 --- a/gio/tests/contexts.c +++ b/gio/tests/contexts.c @@ -185,7 +185,6 @@ main (int argc, char **argv) GError *error = NULL; int ret; - g_type_init (); g_test_init (&argc, &argv, NULL); g_file_get_contents (TEST_FILE, &test_file_buffer, diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c index fc9c896..c3d2106 100644 --- a/gio/tests/converter-stream.c +++ b/gio/tests/converter-stream.c @@ -1172,7 +1172,6 @@ main (int argc, gint i; - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gio/tests/data-input-stream.c b/gio/tests/data-input-stream.c index 2dddb56..58a3b3a 100644 --- a/gio/tests/data-input-stream.c +++ b/gio/tests/data-input-stream.c @@ -485,7 +485,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/data-input-stream/basic", test_basic); diff --git a/gio/tests/data-output-stream.c b/gio/tests/data-output-stream.c index f2ffd23..2ea0cb7 100644 --- a/gio/tests/data-output-stream.c +++ b/gio/tests/data-output-stream.c @@ -494,7 +494,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/data-output-stream/basic", test_basic); diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c index 787d217..1c2cc02 100644 --- a/gio/tests/desktop-app-info.c +++ b/gio/tests/desktop-app-info.c @@ -356,7 +356,6 @@ main (int argc, { gint result; - g_type_init (); g_test_init (&argc, &argv, NULL); basedir = g_get_current_dir (); diff --git a/gio/tests/echo-server.c b/gio/tests/echo-server.c index c0a1997..7634b5b 100644 --- a/gio/tests/echo-server.c +++ b/gio/tests/echo-server.c @@ -42,8 +42,6 @@ main (int argc, char *argv[]) GOptionContext *context; GError *error = NULL; - g_type_init (); - context = g_option_context_new (" - Test GSocket server stuff"); g_option_context_add_main_entries (context, cmd_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/gio/tests/file.c b/gio/tests/file.c index f19b87d..e2d17d4 100644 --- a/gio/tests/file.c +++ b/gio/tests/file.c @@ -653,8 +653,6 @@ test_async_delete (void) int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/file/basic", test_basic); diff --git a/gio/tests/fileattributematcher.c b/gio/tests/fileattributematcher.c index 3fa1b76..95b78ec 100644 --- a/gio/tests/fileattributematcher.c +++ b/gio/tests/fileattributematcher.c @@ -166,8 +166,6 @@ test_subtract (void) int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/fileattributematcher/exact", test_exact); diff --git a/gio/tests/filter-cat.c b/gio/tests/filter-cat.c index ff7ddd3..a367461 100644 --- a/gio/tests/filter-cat.c +++ b/gio/tests/filter-cat.c @@ -215,8 +215,6 @@ main (int argc, char *argv[]) GFile *file; int i; - g_type_init (); - context = g_option_context_new ("LOCATION... - concatenate LOCATIONS " "to standard output."); diff --git a/gio/tests/filter-streams.c b/gio/tests/filter-streams.c index 6877a21..7a700c4 100644 --- a/gio/tests/filter-streams.c +++ b/gio/tests/filter-streams.c @@ -249,7 +249,6 @@ main (int argc, char **argv) g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); - g_type_init (); g_test_add_func ("/filter-stream/input", test_input_filter); g_test_add_func ("/filter-stream/output", test_output_filter); #if 0 diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c index ec0ae27..85fc9f3 100644 --- a/gio/tests/g-file-info.c +++ b/gio/tests/g-file-info.c @@ -118,7 +118,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/g-file-info/test_g_file_info", test_g_file_info); diff --git a/gio/tests/g-file.c b/gio/tests/g-file.c index 8f0a18b..9e3a633 100644 --- a/gio/tests/g-file.c +++ b/gio/tests/g-file.c @@ -506,7 +506,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); diff --git a/gio/tests/g-icon.c b/gio/tests/g-icon.c index e38ee34..8431135 100644 --- a/gio/tests/g-icon.c +++ b/gio/tests/g-icon.c @@ -371,7 +371,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/icons/serialize", test_g_icon_serialize); diff --git a/gio/tests/gapplication-example-cmdline2.c b/gio/tests/gapplication-example-cmdline2.c index 9e6d896..dc25e95 100644 --- a/gio/tests/gapplication-example-cmdline2.c +++ b/gio/tests/gapplication-example-cmdline2.c @@ -82,8 +82,6 @@ test_application_new (const gchar *application_id, { g_return_val_if_fail (g_application_id_is_valid (application_id), NULL); - g_type_init (); - return g_object_new (test_application_get_type (), "application-id", application_id, "flags", flags, diff --git a/gio/tests/gapplication-example-dbushooks.c b/gio/tests/gapplication-example-dbushooks.c index ab33f46..e93cf08 100644 --- a/gio/tests/gapplication-example-dbushooks.c +++ b/gio/tests/gapplication-example-dbushooks.c @@ -73,8 +73,6 @@ test_application_new (const gchar *application_id, { g_return_val_if_fail (g_application_id_is_valid (application_id), NULL); - g_type_init (); - return g_object_new (test_application_get_type (), "application-id", application_id, "flags", flags, diff --git a/gio/tests/gapplication.c b/gio/tests/gapplication.c index 2e0ea9d..044bb37 100644 --- a/gio/tests/gapplication.c +++ b/gio/tests/gapplication.c @@ -451,8 +451,6 @@ test_actions (void) int main (int argc, char **argv) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_dbus_unset (); diff --git a/gio/tests/gdbus-addresses.c b/gio/tests/gdbus-addresses.c index 9ead2ec..72388c5 100644 --- a/gio/tests/gdbus-addresses.c +++ b/gio/tests/gdbus-addresses.c @@ -106,7 +106,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/gdbus/empty-address", test_empty_address); diff --git a/gio/tests/gdbus-auth.c b/gio/tests/gdbus-auth.c index 737770e..cafa13f 100644 --- a/gio/tests/gdbus-auth.c +++ b/gio/tests/gdbus-auth.c @@ -266,7 +266,6 @@ main (int argc, setlocale (LC_ALL, "C"); - g_type_init (); g_test_init (&argc, &argv, NULL); session_bus_up (); diff --git a/gio/tests/gdbus-bz627724.c b/gio/tests/gdbus-bz627724.c index b9ea9c9..d3d8cac 100644 --- a/gio/tests/gdbus-bz627724.c +++ b/gio/tests/gdbus-bz627724.c @@ -80,7 +80,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_dbus_unset (); diff --git a/gio/tests/gdbus-close-pending.c b/gio/tests/gdbus-close-pending.c index 287e778..a707e08 100644 --- a/gio/tests/gdbus-close-pending.c +++ b/gio/tests/gdbus-close-pending.c @@ -384,7 +384,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add ("/gdbus/close-pending", Fixture, "close", diff --git a/gio/tests/gdbus-connection-flush-helper.c b/gio/tests/gdbus-connection-flush-helper.c index 5e36075..dd9f4a7 100644 --- a/gio/tests/gdbus-connection-flush-helper.c +++ b/gio/tests/gdbus-connection-flush-helper.c @@ -30,8 +30,6 @@ main (int argc, GError *error; gboolean ret; - g_type_init (); - error = NULL; c = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, /* GCancellable* */ diff --git a/gio/tests/gdbus-connection-flush.c b/gio/tests/gdbus-connection-flush.c index 9b8dccf..b331e4b 100644 --- a/gio/tests/gdbus-connection-flush.c +++ b/gio/tests/gdbus-connection-flush.c @@ -370,7 +370,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add ("/gdbus/connection/flush/busy", Fixture, NULL, diff --git a/gio/tests/gdbus-connection-loss.c b/gio/tests/gdbus-connection-loss.c index 504383e..addc2a3 100644 --- a/gio/tests/gdbus-connection-loss.c +++ b/gio/tests/gdbus-connection-loss.c @@ -113,7 +113,6 @@ main (int argc, GError *error; gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ diff --git a/gio/tests/gdbus-connection-slow.c b/gio/tests/gdbus-connection-slow.c index b3c40f9..b372df3 100644 --- a/gio/tests/gdbus-connection-slow.c +++ b/gio/tests/gdbus-connection-slow.c @@ -194,7 +194,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c index f4ba37d..baa062b 100644 --- a/gio/tests/gdbus-connection.c +++ b/gio/tests/gdbus-connection.c @@ -1142,7 +1142,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ diff --git a/gio/tests/gdbus-daemon.c b/gio/tests/gdbus-daemon.c index 0471708..a332699 100644 --- a/gio/tests/gdbus-daemon.c +++ b/gio/tests/gdbus-daemon.c @@ -22,8 +22,6 @@ main (int argc, char *argv[]) { NULL } }; - g_type_init (); - context = g_option_context_new (""); g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); g_option_context_set_summary (context, diff --git a/gio/tests/gdbus-error.c b/gio/tests/gdbus-error.c index 00dfc61..96f3a76 100644 --- a/gio/tests/gdbus-error.c +++ b/gio/tests/gdbus-error.c @@ -257,7 +257,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/gdbus/registered-errors", test_registered_errors); diff --git a/gio/tests/gdbus-example-export.c b/gio/tests/gdbus-example-export.c index 51af051..341ce60 100644 --- a/gio/tests/gdbus-example-export.c +++ b/gio/tests/gdbus-example-export.c @@ -303,8 +303,6 @@ main (int argc, char *argv[]) GMainLoop *loop; MyObject *myobj; - g_type_init (); - /* We are lazy here - we don't want to manually provide * the introspection data structures - so we just build * them from XML. diff --git a/gio/tests/gdbus-example-objectmanager-client.c b/gio/tests/gdbus-example-objectmanager-client.c index 3d9242d..a993996 100644 --- a/gio/tests/gdbus-example-objectmanager-client.c +++ b/gio/tests/gdbus-example-objectmanager-client.c @@ -117,8 +117,6 @@ main (gint argc, gchar *argv[]) manager = NULL; loop = NULL; - g_type_init (); - loop = g_main_loop_new (NULL, FALSE); error = NULL; diff --git a/gio/tests/gdbus-example-objectmanager-server.c b/gio/tests/gdbus-example-objectmanager-server.c index 367b4f4..1233958 100644 --- a/gio/tests/gdbus-example-objectmanager-server.c +++ b/gio/tests/gdbus-example-objectmanager-server.c @@ -139,8 +139,6 @@ main (gint argc, gchar *argv[]) GMainLoop *loop; guint id; - g_type_init (); - loop = g_main_loop_new (NULL, FALSE); id = g_bus_own_name (G_BUS_TYPE_SESSION, diff --git a/gio/tests/gdbus-example-own-name.c b/gio/tests/gdbus-example-own-name.c index 0466cd4..74d3920 100644 --- a/gio/tests/gdbus-example-own-name.c +++ b/gio/tests/gdbus-example-own-name.c @@ -43,8 +43,6 @@ main (int argc, char *argv[]) { NULL} }; - g_type_init (); - error = NULL; opt_name = NULL; opt_replace = FALSE; diff --git a/gio/tests/gdbus-example-peer.c b/gio/tests/gdbus-example-peer.c index cb54a13..b954f74 100644 --- a/gio/tests/gdbus-example-peer.c +++ b/gio/tests/gdbus-example-peer.c @@ -177,8 +177,6 @@ main (int argc, char *argv[]) ret = 1; - g_type_init (); - opt_address = NULL; opt_server = FALSE; opt_allow_anonymous = FALSE; diff --git a/gio/tests/gdbus-example-server.c b/gio/tests/gdbus-example-server.c index 79f83df..6f1123d 100644 --- a/gio/tests/gdbus-example-server.c +++ b/gio/tests/gdbus-example-server.c @@ -363,8 +363,6 @@ main (int argc, char *argv[]) guint owner_id; GMainLoop *loop; - g_type_init (); - /* We are lazy here - we don't want to manually provide * the introspection data structures - so we just build * them from XML. diff --git a/gio/tests/gdbus-example-subtree.c b/gio/tests/gdbus-example-subtree.c index cd3365f..e921070 100644 --- a/gio/tests/gdbus-example-subtree.c +++ b/gio/tests/gdbus-example-subtree.c @@ -364,8 +364,6 @@ main (int argc, char *argv[]) guint owner_id; GMainLoop *loop; - g_type_init (); - /* We are lazy here - we don't want to manually provide * the introspection data structures - so we just build * them from XML. diff --git a/gio/tests/gdbus-example-unix-fd-client.c b/gio/tests/gdbus-example-unix-fd-client.c index 9b9c27a..e3ab015 100644 --- a/gio/tests/gdbus-example-unix-fd-client.c +++ b/gio/tests/gdbus-example-unix-fd-client.c @@ -116,8 +116,6 @@ main (int argc, char *argv[]) guint watcher_id; GMainLoop *loop; - g_type_init (); - watcher_id = g_bus_watch_name (G_BUS_TYPE_SESSION, "org.gtk.GDBus.TestServer", G_BUS_NAME_WATCHER_FLAGS_NONE, diff --git a/gio/tests/gdbus-example-watch-name.c b/gio/tests/gdbus-example-watch-name.c index 769419b..caec6ec 100644 --- a/gio/tests/gdbus-example-watch-name.c +++ b/gio/tests/gdbus-example-watch-name.c @@ -43,8 +43,6 @@ main (int argc, char *argv[]) GError *error; GBusNameWatcherFlags flags; - g_type_init (); - error = NULL; opt_context = g_option_context_new ("g_bus_watch_name() example"); g_option_context_set_summary (opt_context, diff --git a/gio/tests/gdbus-example-watch-proxy.c b/gio/tests/gdbus-example-watch-proxy.c index c66826d..51132e3 100644 --- a/gio/tests/gdbus-example-watch-proxy.c +++ b/gio/tests/gdbus-example-watch-proxy.c @@ -153,8 +153,6 @@ main (int argc, char *argv[]) GDBusProxyFlags flags; GDBusProxy *proxy; - g_type_init (); - loop = NULL; proxy = NULL; diff --git a/gio/tests/gdbus-exit-on-close.c b/gio/tests/gdbus-exit-on-close.c index f97e5da..08338c4 100644 --- a/gio/tests/gdbus-exit-on-close.c +++ b/gio/tests/gdbus-exit-on-close.c @@ -203,7 +203,6 @@ main (int argc, { gint i; - g_type_init (); g_test_init (&argc, &argv, NULL); for (i = 0; cases[i].name != NULL; i++) diff --git a/gio/tests/gdbus-export.c b/gio/tests/gdbus-export.c index e015ed9..bc62bfd 100644 --- a/gio/tests/gdbus-export.c +++ b/gio/tests/gdbus-export.c @@ -1531,7 +1531,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ diff --git a/gio/tests/gdbus-introspection.c b/gio/tests/gdbus-introspection.c index 17a1870..2f66e49 100644 --- a/gio/tests/gdbus-introspection.c +++ b/gio/tests/gdbus-introspection.c @@ -303,7 +303,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ diff --git a/gio/tests/gdbus-message.c b/gio/tests/gdbus-message.c index 13d5d0d..36ffc41 100644 --- a/gio/tests/gdbus-message.c +++ b/gio/tests/gdbus-message.c @@ -149,7 +149,6 @@ main (int argc, { setlocale (LC_ALL, "C"); - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/gdbus/message/lock", message_lock); diff --git a/gio/tests/gdbus-names.c b/gio/tests/gdbus-names.c index 246a261..b478c6f 100644 --- a/gio/tests/gdbus-names.c +++ b/gio/tests/gdbus-names.c @@ -769,7 +769,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); loop = g_main_loop_new (NULL, FALSE); diff --git a/gio/tests/gdbus-non-socket.c b/gio/tests/gdbus-non-socket.c index 238b303..77c814d 100644 --- a/gio/tests/gdbus-non-socket.c +++ b/gio/tests/gdbus-non-socket.c @@ -291,7 +291,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/gdbus/non-socket", test_non_socket); diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c index d25f9f6..0435597 100644 --- a/gio/tests/gdbus-peer.c +++ b/gio/tests/gdbus-peer.c @@ -1801,7 +1801,6 @@ main (int argc, GDBusNodeInfo *introspection_data = NULL; gchar *tmpdir = NULL; - g_type_init (); g_test_init (&argc, &argv, NULL); introspection_data = g_dbus_node_info_new_for_xml (test_interface_introspection_xml, NULL); diff --git a/gio/tests/gdbus-proxy-threads.c b/gio/tests/gdbus-proxy-threads.c index 14131ee..c74c05c 100644 --- a/gio/tests/gdbus-proxy-threads.c +++ b/gio/tests/gdbus-proxy-threads.c @@ -239,7 +239,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_dbus_unset (); diff --git a/gio/tests/gdbus-proxy-well-known-name.c b/gio/tests/gdbus-proxy-well-known-name.c index b2d204d..1e8ea5e 100644 --- a/gio/tests/gdbus-proxy-well-known-name.c +++ b/gio/tests/gdbus-proxy-well-known-name.c @@ -259,7 +259,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); /* all the tests rely on a shared main loop */ diff --git a/gio/tests/gdbus-proxy.c b/gio/tests/gdbus-proxy.c index 06bd8aa..e614ed3 100644 --- a/gio/tests/gdbus-proxy.c +++ b/gio/tests/gdbus-proxy.c @@ -912,7 +912,6 @@ main (int argc, gint ret; GDBusNodeInfo *introspection_data = NULL; - g_type_init (); g_test_init (&argc, &argv, NULL); introspection_data = g_dbus_node_info_new_for_xml (frob_dbus_interface_xml, NULL); diff --git a/gio/tests/gdbus-serialization.c b/gio/tests/gdbus-serialization.c index 16b9873..e94fc4d 100644 --- a/gio/tests/gdbus-serialization.c +++ b/gio/tests/gdbus-serialization.c @@ -1056,7 +1056,6 @@ main (int argc, { setlocale (LC_ALL, "C"); - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id="); diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c index 83965aa..8af2ca6 100644 --- a/gio/tests/gdbus-test-codegen.c +++ b/gio/tests/gdbus-test-codegen.c @@ -2354,7 +2354,6 @@ main (int argc, { gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); session_bus_up (); diff --git a/gio/tests/gdbus-threading.c b/gio/tests/gdbus-threading.c index 728b70e..5373cbe 100644 --- a/gio/tests/gdbus-threading.c +++ b/gio/tests/gdbus-threading.c @@ -582,7 +582,6 @@ main (int argc, GError *error; gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); session_bus_up (); diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c index 82bc0cc..b5bdac2 100644 --- a/gio/tests/gmenumodel.c +++ b/gio/tests/gmenumodel.c @@ -1141,7 +1141,6 @@ main (int argc, char **argv) gboolean ret; g_test_init (&argc, &argv, NULL); - g_type_init (); session_bus_up (); diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c index 38d4d3e..a5ce10a 100644 --- a/gio/tests/gschema-compile.c +++ b/gio/tests/gschema-compile.c @@ -131,7 +131,6 @@ main (int argc, char *argv[]) setlocale (LC_ALL, ""); - g_type_init (); g_test_init (&argc, &argv, NULL); for (i = 0; i < G_N_ELEMENTS (tests); ++i) diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c index 9628bad..515fad2 100644 --- a/gio/tests/gsettings.c +++ b/gio/tests/gsettings.c @@ -2141,7 +2141,6 @@ main (int argc, char *argv[]) if (!backend_set) g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); - g_type_init (); g_test_init (&argc, &argv, NULL); g_remove ("org.gtk.test.enums.xml"); diff --git a/gio/tests/httpd.c b/gio/tests/httpd.c index a2325d0..41bc6c8 100644 --- a/gio/tests/httpd.c +++ b/gio/tests/httpd.c @@ -146,8 +146,6 @@ main (int argc, char *argv[]) GOptionContext *context; GError *error = NULL; - g_type_init (); - context = g_option_context_new (" - Simple HTTP server"); g_option_context_add_main_entries (context, cmd_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/gio/tests/inet-address.c b/gio/tests/inet-address.c index 3a2fbbc..566078b 100644 --- a/gio/tests/inet-address.c +++ b/gio/tests/inet-address.c @@ -347,7 +347,6 @@ test_mask_match (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/inet-address/parse", test_parse); diff --git a/gio/tests/io-stream.c b/gio/tests/io-stream.c index 0a20980..59b1c26 100644 --- a/gio/tests/io-stream.c +++ b/gio/tests/io-stream.c @@ -177,7 +177,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/io-stream/copy-chunks", test_copy_chunks); diff --git a/gio/tests/live-g-file.c b/gio/tests/live-g-file.c index 32b600b..c104a9c 100644 --- a/gio/tests/live-g-file.c +++ b/gio/tests/live-g-file.c @@ -1236,7 +1236,6 @@ main (int argc, char *argv[]) posix_compat = FALSE; /* strip all gtester-specific args */ - g_type_init (); g_test_init (&argc, &argv, NULL); /* no extra parameters specified, assume we're executed from glib test suite */ diff --git a/gio/tests/memory-input-stream.c b/gio/tests/memory-input-stream.c index d012125..98bb2f1 100644 --- a/gio/tests/memory-input-stream.c +++ b/gio/tests/memory-input-stream.c @@ -226,7 +226,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/memory-input-stream/read-chunks", test_read_chunks); diff --git a/gio/tests/memory-output-stream.c b/gio/tests/memory-output-stream.c index ddaa75f..e9bfc3d 100644 --- a/gio/tests/memory-output-stream.c +++ b/gio/tests/memory-output-stream.c @@ -216,7 +216,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gio/tests/mimeapps.c b/gio/tests/mimeapps.c index 5c99917..9bc22ba 100644 --- a/gio/tests/mimeapps.c +++ b/gio/tests/mimeapps.c @@ -580,7 +580,6 @@ test_scheme_handler (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); setup (); diff --git a/gio/tests/network-address.c b/gio/tests/network-address.c index 7d6a0da..7a419c2 100644 --- a/gio/tests/network-address.c +++ b/gio/tests/network-address.c @@ -111,8 +111,6 @@ main (int argc, char *argv[]) gint i; gchar *path; - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/network-address/basic", test_basic); diff --git a/gio/tests/network-monitor.c b/gio/tests/network-monitor.c index 7205da1..618b5e0 100644 --- a/gio/tests/network-monitor.c +++ b/gio/tests/network-monitor.c @@ -514,8 +514,6 @@ main (int argc, char **argv) { int ret; - g_type_init (); - if (argc == 2 && !strcmp (argv[1], "--watch")) { do_watch_network (); diff --git a/gio/tests/permission.c b/gio/tests/permission.c index e011a44..14094a0 100644 --- a/gio/tests/permission.c +++ b/gio/tests/permission.c @@ -109,7 +109,6 @@ test_simple (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/permission/simple", test_simple); diff --git a/gio/tests/pollable.c b/gio/tests/pollable.c index 8a27da8..0633e4a 100644 --- a/gio/tests/pollable.c +++ b/gio/tests/pollable.c @@ -274,7 +274,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); #ifdef G_OS_UNIX diff --git a/gio/tests/proxy-test.c b/gio/tests/proxy-test.c index 00e87df..842e7d9 100644 --- a/gio/tests/proxy-test.c +++ b/gio/tests/proxy-test.c @@ -1096,7 +1096,6 @@ main (int argc, GCancellable *cancellable; gint result; - g_type_init (); g_test_init (&argc, &argv, NULL); /* Register stuff. The dummy g_proxy_get_default_for_protocol() call diff --git a/gio/tests/proxy.c b/gio/tests/proxy.c index c05d7e9..5738300 100644 --- a/gio/tests/proxy.c +++ b/gio/tests/proxy.c @@ -580,8 +580,6 @@ main (gint argc, gchar **argv) gboolean cancel = FALSE; ProxyTestType type = USE_RESOLVER; - g_type_init (); - while (argc >= 2 && argv[1][0] == '-') { if (!strcmp (argv[1], "-s")) diff --git a/gio/tests/readwrite.c b/gio/tests/readwrite.c index 7836270..0484d18 100644 --- a/gio/tests/readwrite.c +++ b/gio/tests/readwrite.c @@ -284,7 +284,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/readwrite/test_g_file_open_readwrite", diff --git a/gio/tests/resolver.c b/gio/tests/resolver.c index 81a6df2..02aa0c8 100644 --- a/gio/tests/resolver.c +++ b/gio/tests/resolver.c @@ -684,8 +684,6 @@ main (int argc, char **argv) guint watch; #endif - g_type_init (); - context = g_option_context_new ("lookups ..."); g_option_context_add_main_entries (context, option_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/gio/tests/resources.c b/gio/tests/resources.c index e47d92f..d21513b 100644 --- a/gio/tests/resources.c +++ b/gio/tests/resources.c @@ -630,7 +630,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); _g_test2_register_resource (); diff --git a/gio/tests/send-data.c b/gio/tests/send-data.c index 201e710..a30bdca 100644 --- a/gio/tests/send-data.c +++ b/gio/tests/send-data.c @@ -90,8 +90,6 @@ main (int argc, char *argv[]) GError *error = NULL; char buffer[1000]; - g_type_init (); - context = g_option_context_new (" [:port] - send data to tcp host"); g_option_context_add_main_entries (context, cmd_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/gio/tests/simple-async-result.c b/gio/tests/simple-async-result.c index 8112057..e9b089e 100644 --- a/gio/tests/simple-async-result.c +++ b/gio/tests/simple-async-result.c @@ -122,7 +122,6 @@ test_simple_async (void) int main (int argc, char **argv) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/gio/simple-async-result/test", test_simple_async); diff --git a/gio/tests/sleepy-stream.c b/gio/tests/sleepy-stream.c index 6d9da7b..4d3ca1d 100644 --- a/gio/tests/sleepy-stream.c +++ b/gio/tests/sleepy-stream.c @@ -285,7 +285,6 @@ main (int argc, char **argv) g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); - g_type_init (); g_test_add_func ("/filter-stream/input", test); g_test_add_func ("/filter-stream/async", asynch); diff --git a/gio/tests/socket-client.c b/gio/tests/socket-client.c index ca06c0f..62dda89 100644 --- a/gio/tests/socket-client.c +++ b/gio/tests/socket-client.c @@ -261,8 +261,6 @@ main (int argc, GTlsCertificate *certificate = NULL; gint i; - g_type_init (); - address = NULL; connection = NULL; diff --git a/gio/tests/socket-server.c b/gio/tests/socket-server.c index b89edb5..decf3ec 100644 --- a/gio/tests/socket-server.c +++ b/gio/tests/socket-server.c @@ -63,8 +63,6 @@ main (int argc, GInputStream *istream; GOutputStream *ostream; - g_type_init (); - context = g_option_context_new (" - Test GSocket server stuff"); g_option_context_add_main_entries (context, cmd_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/gio/tests/socket.c b/gio/tests/socket.c index 0a61c9f..f142296 100644 --- a/gio/tests/socket.c +++ b/gio/tests/socket.c @@ -817,7 +817,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/socket/ipv4_sync", test_ipv4_sync); diff --git a/gio/tests/srvtarget.c b/gio/tests/srvtarget.c index c7330f9..84f803e 100644 --- a/gio/tests/srvtarget.c +++ b/gio/tests/srvtarget.c @@ -149,7 +149,6 @@ test_srv_target_ordering (void) int main (int argc, char **argv) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/srvtarget/srv-target-ordering", test_srv_target_ordering); diff --git a/gio/tests/task.c b/gio/tests/task.c index 7c7606f..e728ff8 100644 --- a/gio/tests/task.c +++ b/gio/tests/task.c @@ -1632,7 +1632,6 @@ main (int argc, char **argv) { int ret; - g_type_init (); g_test_init (&argc, &argv, NULL); loop = g_main_loop_new (NULL, FALSE); diff --git a/gio/tests/tls-certificate.c b/gio/tests/tls-certificate.c index a1796da..4db07b3 100644 --- a/gio/tests/tls-certificate.c +++ b/gio/tests/tls-certificate.c @@ -269,7 +269,6 @@ main (int argc, Reference ref; GError *error = NULL; - g_type_init (); g_test_init (&argc, &argv, NULL); _g_test_tls_backend_get_type (); diff --git a/gio/tests/tls-interaction.c b/gio/tests/tls-interaction.c index 3498d0c..a34ff29 100644 --- a/gio/tests/tls-interaction.c +++ b/gio/tests/tls-interaction.c @@ -606,7 +606,6 @@ main (int argc, GPtrArray *fixtures; gint ret; - g_type_init (); g_test_init (&argc, &argv, NULL); fixtures = g_ptr_array_new_with_free_func (g_free); diff --git a/gio/tests/unix-fd.c b/gio/tests/unix-fd.c index 02a63ca..fd922c5 100644 --- a/gio/tests/unix-fd.c +++ b/gio/tests/unix-fd.c @@ -235,8 +235,6 @@ main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); - g_type_init (); - g_test_add_func ("/unix-streams/file-descriptors", test_fds); return g_test_run(); diff --git a/gio/tests/unix-streams.c b/gio/tests/unix-streams.c index 5985078..36eb3d6 100644 --- a/gio/tests/unix-streams.c +++ b/gio/tests/unix-streams.c @@ -299,7 +299,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/unix-streams/basic", test_basic); diff --git a/gio/tests/vfs.c b/gio/tests/vfs.c index 7a7f817..47ba3c0 100644 --- a/gio/tests/vfs.c +++ b/gio/tests/vfs.c @@ -46,7 +46,6 @@ test_local (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/gvfs/local", test_local); diff --git a/gio/tests/volumemonitor.c b/gio/tests/volumemonitor.c index 4891505..6b61c30 100644 --- a/gio/tests/volumemonitor.c +++ b/gio/tests/volumemonitor.c @@ -164,8 +164,6 @@ main (int argc, char *argv[]) g_setenv ("GIO_USE_VFS", "local", FALSE); - g_type_init (); - g_test_init (&argc, &argv, NULL); monitor = g_volume_monitor_get (); diff --git a/gio/tests/win32-streams.c b/gio/tests/win32-streams.c index 99f853b..b7ff0b3 100644 --- a/gio/tests/win32-streams.c +++ b/gio/tests/win32-streams.c @@ -525,7 +525,6 @@ int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/win32-streams/pipe-io-test", test_pipe_io); diff --git a/gobject/gobject-query.c b/gobject/gobject-query.c index 7f208ed..179acb6 100644 --- a/gobject/gobject-query.c +++ b/gobject/gobject-query.c @@ -135,8 +135,6 @@ main (gint argc, root = G_TYPE_OBJECT; - g_type_init (); - for (i = 1; i < argc; i++) { if (strcmp ("-s", argv[i]) == 0) diff --git a/gobject/gvalue.c b/gobject/gvalue.c index fcadab9..9044d6f 100644 --- a/gobject/gvalue.c +++ b/gobject/gvalue.c @@ -79,8 +79,6 @@ * GValue b = G_VALUE_INIT; * const gchar *message; * - * g_type_init (); - * * /* The GValue starts empty */ * g_assert (!G_VALUE_HOLDS_STRING (&a)); * diff --git a/gobject/testgobject.c b/gobject/testgobject.c index 411fb35..d5d8d63 100644 --- a/gobject/testgobject.c +++ b/gobject/testgobject.c @@ -386,7 +386,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS | G_TYPE_DEBUG_SIGNALS); /* test new fundamentals */ g_assert (G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_USER_FIRST) == g_type_fundamental_next ()); diff --git a/gobject/tests/binding.c b/gobject/tests/binding.c index 310a991..b6dcdbb 100644 --- a/gobject/tests/binding.c +++ b/gobject/tests/binding.c @@ -573,7 +573,6 @@ binding_same_object (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gobject/tests/boxed.c b/gobject/tests/boxed.c index 5787666..7b764c2 100644 --- a/gobject/tests/boxed.c +++ b/gobject/tests/boxed.c @@ -507,7 +507,6 @@ test_boxed_variantbuilder (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/boxed/define", test_define_boxed); diff --git a/gobject/tests/dynamictests.c b/gobject/tests/dynamictests.c index 6c5d39f..a052e1a 100644 --- a/gobject/tests/dynamictests.c +++ b/gobject/tests/dynamictests.c @@ -359,7 +359,6 @@ main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL); - g_type_init (); g_test_add_func ("/GObject/threaded-dynamic-ref-unref-init", test_multithreaded_dynamic_type_init); g_test_add_func ("/GObject/dynamic-interface-properties", test_dynamic_interface_properties); diff --git a/gobject/tests/enums.c b/gobject/tests/enums.c index 72df8a8..2d05d4b 100644 --- a/gobject/tests/enums.c +++ b/gobject/tests/enums.c @@ -115,7 +115,6 @@ test_flags_basic (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/enum/basic", test_enum_basic); diff --git a/gobject/tests/ifaceproperties.c b/gobject/tests/ifaceproperties.c index c86a23b..1fba57e 100644 --- a/gobject/tests/ifaceproperties.c +++ b/gobject/tests/ifaceproperties.c @@ -633,8 +633,6 @@ test_not_overridden (void) int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gobject/tests/param.c b/gobject/tests/param.c index ac401f3..5b14fcf 100644 --- a/gobject/tests/param.c +++ b/gobject/tests/param.c @@ -788,7 +788,6 @@ test_param_implement (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_add_func ("/param/value", test_param_value); diff --git a/gobject/tests/properties.c b/gobject/tests/properties.c index b0bee2a..27c2a22 100644 --- a/gobject/tests/properties.c +++ b/gobject/tests/properties.c @@ -256,7 +256,6 @@ properties_construct (void) int main (int argc, char *argv[]) { - g_type_init (); g_test_init (&argc, &argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/"); diff --git a/gobject/tests/qdata.c b/gobject/tests/qdata.c index aeacc45..b126579 100644 --- a/gobject/tests/qdata.c +++ b/gobject/tests/qdata.c @@ -84,7 +84,7 @@ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); - g_type_init (); + fail = !!g_getenv ("FAIL"); g_test_add_func ("/qdata/threaded", test_qdata_threaded); diff --git a/gobject/tests/reference.c b/gobject/tests/reference.c index 0724ae9..0742339 100644 --- a/gobject/tests/reference.c +++ b/gobject/tests/reference.c @@ -598,8 +598,6 @@ main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); - g_type_init (); - g_test_add_func ("/type/fundamentals", test_fundamentals); g_test_add_func ("/type/qdata", test_type_qdata); g_test_add_func ("/type/query", test_type_query); diff --git a/gobject/tests/signals.c b/gobject/tests/signals.c index 019d9e4..b8cf26a 100644 --- a/gobject/tests/signals.c +++ b/gobject/tests/signals.c @@ -842,8 +842,6 @@ int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/gobject/signals/all-types", test_all_types); diff --git a/gobject/tests/threadtests.c b/gobject/tests/threadtests.c index d7f353c..eae7ec0 100644 --- a/gobject/tests/threadtests.c +++ b/gobject/tests/threadtests.c @@ -336,7 +336,6 @@ main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL); - g_type_init (); g_test_add_func ("/GObject/threaded-class-init", test_threaded_class_init); g_test_add_func ("/GObject/threaded-object-init", test_threaded_object_init); diff --git a/gobject/tests/valuearray.c b/gobject/tests/valuearray.c index 3eb5288..cce7087 100644 --- a/gobject/tests/valuearray.c +++ b/gobject/tests/valuearray.c @@ -56,8 +56,6 @@ test_basic (void) int main (int argc, char *argv[]) { - g_type_init (); - g_test_init (&argc, &argv, NULL); g_test_add_func ("/valuearray/basic", test_basic); diff --git a/tests/gio-ls.c b/tests/gio-ls.c index c29ea6c..9ae74d4 100644 --- a/tests/gio-ls.c +++ b/tests/gio-ls.c @@ -32,8 +32,6 @@ main (int argc, char *argv[]) GError *error = NULL; int i; - g_type_init (); - context = g_option_context_new(_("[FILE...]")); g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); diff --git a/tests/gobject/accumulator.c b/tests/gobject/accumulator.c index a4aaee9..cb76963 100644 --- a/tests/gobject/accumulator.c +++ b/tests/gobject/accumulator.c @@ -262,7 +262,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init (); object = g_object_new (TEST_TYPE_OBJECT, NULL); diff --git a/tests/gobject/defaultiface.c b/tests/gobject/defaultiface.c index b6710a4..a650922 100644 --- a/tests/gobject/defaultiface.c +++ b/tests/gobject/defaultiface.c @@ -181,7 +181,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init (); test_static_iface (); test_dynamic_iface (); diff --git a/tests/gobject/dynamictype.c b/tests/gobject/dynamictype.c index 4516bd6..d48b7e3 100644 --- a/tests/gobject/dynamictype.c +++ b/tests/gobject/dynamictype.c @@ -164,7 +164,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init (); test_dynamic_type (); diff --git a/tests/gobject/gvalue-test.c b/tests/gobject/gvalue-test.c index 6622c9f..fa7bede 100644 --- a/tests/gobject/gvalue-test.c +++ b/tests/gobject/gvalue-test.c @@ -388,7 +388,6 @@ int main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL); - g_type_init (); g_test_add_func ("/gvalue/enum-transformation", test_enum_transformation); g_test_add_func ("/gvalue/gtype", test_gtype_value); diff --git a/tests/gobject/ifacecheck.c b/tests/gobject/ifacecheck.c index 86ce2e2..e00d9b5 100644 --- a/tests/gobject/ifacecheck.c +++ b/tests/gobject/ifacecheck.c @@ -118,8 +118,6 @@ main (int argc, char *string1 = "A"; char *string2 = "B"; - g_type_init (); - /* Basic check of interfaces added before class_init time */ g_type_add_interface_check (string1, check_func); diff --git a/tests/gobject/ifaceinherit.c b/tests/gobject/ifaceinherit.c index f9fe8be..6c8b5db 100644 --- a/tests/gobject/ifaceinherit.c +++ b/tests/gobject/ifaceinherit.c @@ -189,7 +189,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init (); /* Register BaseObject */ BASE_TYPE_OBJECT; diff --git a/tests/gobject/ifaceinit.c b/tests/gobject/ifaceinit.c index a4aa268..ec62fd7 100644 --- a/tests/gobject/ifaceinit.c +++ b/tests/gobject/ifaceinit.c @@ -381,7 +381,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init (); /* We force the interfaces to be registered in a different order * than we add them, so our logic doesn't always deal with interfaces diff --git a/tests/gobject/override.c b/tests/gobject/override.c index 22535a8..95b4023 100644 --- a/tests/gobject/override.c +++ b/tests/gobject/override.c @@ -400,7 +400,6 @@ main (int argc, char **argv) g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init(); test (TEST_TYPE_A, "foo", "TestA::foo,TestI::foo", NULL); test (TEST_TYPE_A, "bar", "TestA::bar", NULL); diff --git a/tests/gobject/paramspec-test.c b/tests/gobject/paramspec-test.c index b0d4240..129a24f 100644 --- a/tests/gobject/paramspec-test.c +++ b/tests/gobject/paramspec-test.c @@ -256,7 +256,6 @@ int main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL); - g_type_init (); g_test_add_func ("/paramspec/char", test_param_spec_char); g_test_add_func ("/paramspec/string", test_param_spec_string); diff --git a/tests/gobject/performance-threaded.c b/tests/gobject/performance-threaded.c index 56a21eb..76f153f 100644 --- a/tests/gobject/performance-threaded.c +++ b/tests/gobject/performance-threaded.c @@ -340,8 +340,6 @@ main (int argc, GError *error = NULL; int i; - g_type_init (); - context = g_option_context_new ("GObject performance tests"); g_option_context_add_main_entries (context, cmd_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/tests/gobject/performance.c b/tests/gobject/performance.c index fd08351..c9ec519 100644 --- a/tests/gobject/performance.c +++ b/tests/gobject/performance.c @@ -885,8 +885,6 @@ main (int argc, GError *error = NULL; int i; - g_type_init (); - context = g_option_context_new ("GObject performance tests"); g_option_context_add_main_entries (context, cmd_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) diff --git a/tests/gobject/references.c b/tests/gobject/references.c index 86c700f..ff89202 100644 --- a/tests/gobject/references.c +++ b/tests/gobject/references.c @@ -168,7 +168,6 @@ main (int argc, g_log_set_always_fatal (g_log_set_always_fatal (G_LOG_FATAL_MASK) | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - g_type_init (); /* Test basic weak reference operation */ diff --git a/tests/gobject/singleton.c b/tests/gobject/singleton.c index c7609a6..e075496 100644 --- a/tests/gobject/singleton.c +++ b/tests/gobject/singleton.c @@ -71,7 +71,7 @@ main (int argc, char *argv[]) { MySingleton *singleton, *obj; - g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS | G_TYPE_DEBUG_SIGNALS); + /* create the singleton */ singleton = g_object_new (MY_TYPE_SINGLETON, NULL); g_assert (singleton != NULL); diff --git a/tests/refcount/closures.c b/tests/refcount/closures.c index d0a64f0..de48192 100644 --- a/tests/refcount/closures.c +++ b/tests/refcount/closures.c @@ -243,7 +243,6 @@ main (int argc, g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); object = g_object_new (G_TYPE_TEST, NULL); closure = g_cclosure_new (G_CALLBACK (test_signal_handler), TEST_POINTER2, destroy_data); diff --git a/tests/refcount/objects.c b/tests/refcount/objects.c index 230a160..9ff3b60 100644 --- a/tests/refcount/objects.c +++ b/tests/refcount/objects.c @@ -119,7 +119,6 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); test1 = g_object_new (G_TYPE_TEST, NULL); test2 = g_object_new (G_TYPE_TEST, NULL); diff --git a/tests/refcount/objects2.c b/tests/refcount/objects2.c index b50bcc8..51d7aa7 100644 --- a/tests/refcount/objects2.c +++ b/tests/refcount/objects2.c @@ -103,7 +103,6 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); test = g_object_new (G_TYPE_TEST, NULL); diff --git a/tests/refcount/properties.c b/tests/refcount/properties.c index f7c2928..d96a012 100644 --- a/tests/refcount/properties.c +++ b/tests/refcount/properties.c @@ -196,7 +196,6 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); test_objects = g_array_new (FALSE, FALSE, sizeof (GTest *)); diff --git a/tests/refcount/properties2.c b/tests/refcount/properties2.c index 3bef8e5..577e33e 100644 --- a/tests/refcount/properties2.c +++ b/tests/refcount/properties2.c @@ -180,8 +180,7 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); - + test = g_object_new (G_TYPE_TEST, NULL); g_signal_connect (test, "notify::dummy", G_CALLBACK (dummy_notify), NULL); diff --git a/tests/refcount/properties3.c b/tests/refcount/properties3.c index 66f68b5..a5e9257 100644 --- a/tests/refcount/properties3.c +++ b/tests/refcount/properties3.c @@ -161,7 +161,6 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); test = g_object_new (G_TYPE_TEST, NULL); diff --git a/tests/refcount/properties4.c b/tests/refcount/properties4.c index 69411bb..d02a5c6 100644 --- a/tests/refcount/properties4.c +++ b/tests/refcount/properties4.c @@ -153,7 +153,6 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); badger1 = g_object_new (MY_TYPE_BADGER, NULL); badger2 = g_object_new (MY_TYPE_BADGER, NULL); diff --git a/tests/refcount/signals.c b/tests/refcount/signals.c index 066d065..0677834 100644 --- a/tests/refcount/signals.c +++ b/tests/refcount/signals.c @@ -264,7 +264,6 @@ main (int argc, char **argv) g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); - g_type_init (); test1 = g_object_new (G_TYPE_TEST, NULL); test2 = g_object_new (G_TYPE_TEST, NULL); diff --git a/tests/timeloop-closure.c b/tests/timeloop-closure.c index ecbe290..13ce760 100644 --- a/tests/timeloop-closure.c +++ b/tests/timeloop-closure.c @@ -187,8 +187,6 @@ main (int argc, char **argv) struct rusage old_usage; struct rusage new_usage; - g_type_init (); - if (argc > 1) n_children = atoi(argv[1]); -- 2.7.4