all: g_type_init() has been deprecated in GLib 2.35.0

g_type_init() deprecation:
https://bugzilla.gnome.org/show_bug.cgi?id=686161
This commit is contained in:
Jiří Klimeš 2014-05-27 16:47:15 +02:00
parent aba55670cc
commit 98ae6e06d2
49 changed files with 112 additions and 1 deletions

View file

@ -90,7 +90,9 @@ main (int argc, char *argv[])
dbus_bool_t result; dbus_bool_t result;
char *event, *iface, *address; char *event, *iface, *address;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (argc != 4) { if (argc != 4) {
fprintf (stderr, "Error: expected 3 arguments (event, interface, address).\n"); fprintf (stderr, "Error: expected 3 arguments (event, interface, address).\n");

View file

@ -689,7 +689,10 @@ main (int argc, char **argv)
g_option_context_free (opt_ctx); g_option_context_free (opt_ctx);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM)); g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM));
g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT)); g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT));

View file

@ -642,7 +642,10 @@ main (int argc, char **argv)
g_assert (argc > 1); g_assert (argc > 1);
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_add_data_func ("/dispatcher/old_up", argv[1], (GTestDataFunc) test_old_up); g_test_add_data_func ("/dispatcher/old_up", argv[1], (GTestDataFunc) test_old_up);
g_test_add_data_func ("/dispatcher/old_down", argv[1], (GTestDataFunc) test_old_down); g_test_add_data_func ("/dispatcher/old_down", argv[1], (GTestDataFunc) test_old_down);

View file

@ -426,7 +426,9 @@ main (int argc, char *argv[])
textdomain (GETTEXT_PACKAGE); textdomain (GETTEXT_PACKAGE);
#endif #endif
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
nmc_init (&nm_cli); nmc_init (&nm_cli);
g_idle_add (start, &args_info); g_idle_add (start, &args_info);

View file

@ -102,8 +102,10 @@ int main (int argc, char *argv[])
DBusGConnection *bus; DBusGConnection *bus;
DBusGProxy *proxy; DBusGProxy *proxy;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
/* Get system bus */ /* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);

View file

@ -110,8 +110,10 @@ int main (int argc, char *argv[])
NMRemoteSettings *settings; NMRemoteSettings *settings;
GMainLoop *loop; GMainLoop *loop;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
loop = g_main_loop_new (NULL, FALSE); loop = g_main_loop_new (NULL, FALSE);

View file

@ -223,8 +223,10 @@ int main (int argc, char *argv[])
DBusGConnection *bus; DBusGConnection *bus;
DBusGProxy *props_proxy; DBusGProxy *props_proxy;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
/* Get system bus */ /* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);

View file

@ -200,8 +200,10 @@ int main (int argc, char *argv[])
const GPtrArray *devices; const GPtrArray *devices;
int i; int i;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
/* Get system bus */ /* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);

View file

@ -67,8 +67,10 @@ int main (int argc, char *argv[])
DBusGConnection *bus; DBusGConnection *bus;
DBusGProxy *proxy; DBusGProxy *proxy;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
/* Get system bus */ /* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);

View file

@ -153,8 +153,10 @@ int main (int argc, char *argv[])
{ {
DBusGConnection *bus; DBusGConnection *bus;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
/* Get system bus */ /* Get system bus */
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL); bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);

View file

@ -57,8 +57,10 @@ main (int argc, char *argv[])
GMainLoop *loop; GMainLoop *loop;
GBusNameWatcherFlags flags; GBusNameWatcherFlags flags;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n"); g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n");
g_print ("===================================================\n"); g_print ("===================================================\n");

View file

@ -71,8 +71,10 @@ main (int argc, char *argv[])
GError *err = NULL; GError *err = NULL;
gboolean nm_running; gboolean nm_running;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n"); g_print ("Monitor 'org.freedesktop.NetworkManager' D-Bus name\n");
g_print ("===================================================\n"); g_print ("===================================================\n");

View file

@ -91,8 +91,10 @@ main (int argc, char *argv[])
GDBusProxyFlags flags; GDBusProxyFlags flags;
GDBusProxy *proxy; GDBusProxy *proxy;
#if !GLIB_CHECK_VERSION (2, 35, 0)
/* Initialize GType system */ /* Initialize GType system */
g_type_init (); g_type_init ();
#endif
/* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager' interface */ /* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager' interface */
g_print ("Monitor NetworkManager's state\n"); g_print ("Monitor NetworkManager's state\n");

View file

@ -390,7 +390,9 @@ main (int argc, char *argv[])
{ {
NMClient *client; NMClient *client;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
client = nm_client_new (); client = nm_client_new ();
if (!client) { if (!client) {

View file

@ -493,7 +493,10 @@ libnm_glib_init (void)
{ {
libnm_glib_ctx *ctx = NULL; libnm_glib_ctx *ctx = NULL;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!g_thread_supported ()) if (!g_thread_supported ())
g_thread_init (NULL); g_thread_init (NULL);
dbus_g_thread_init (); dbus_g_thread_init ();

View file

@ -931,7 +931,9 @@ main (int argc, char **argv)
{ {
g_assert (argc == 3); g_assert (argc == 3);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);

View file

@ -352,7 +352,9 @@ main (int argc, char **argv)
g_assert (argc == 3); g_assert (argc == 3);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);

View file

@ -954,7 +954,10 @@ main (int argc, char *argv[])
{ {
DBusGConnection *bus; DBusGConnection *bus;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
compare_ints (); compare_ints ();

View file

@ -103,7 +103,9 @@ static void __attribute__((constructor))
_ensure_registered (void) _ensure_registered (void)
{ {
if (G_UNLIKELY (registered_settings == NULL)) { if (G_UNLIKELY (registered_settings == NULL)) {
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
_nm_value_transforms_register (); _nm_value_transforms_register ();
registered_settings = g_hash_table_new (g_str_hash, g_str_equal); registered_settings = g_hash_table_new (g_str_hash, g_str_equal);
registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal); registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal);

View file

@ -2489,7 +2489,9 @@ int main (int argc, char **argv)
GError *error = NULL; GError *error = NULL;
char *base; char *base;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -723,7 +723,9 @@ int main (int argc, char **argv)
GError *error = NULL; GError *error = NULL;
char *base; char *base;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -411,7 +411,9 @@ int main (int argc, char **argv)
if (argc < 3) if (argc < 3)
FAIL ("init", "need at least two arguments: <path> <password>"); FAIL ("init", "need at least two arguments: <path> <password>");
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -304,7 +304,10 @@ int main (int argc, char **argv)
gboolean success; gboolean success;
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
success = nm_utils_init (&error); success = nm_utils_init (&error);
g_assert_no_error (error); g_assert_no_error (error);

View file

@ -104,7 +104,9 @@ int main (int argc, char **argv)
GError *error = NULL; GError *error = NULL;
char *base; char *base;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -281,7 +281,10 @@ test_config_confdir_parse_error (void)
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
g_test_add_func ("/config/simple", test_config_simple); g_test_add_func ("/config/simple", test_config_simple);

View file

@ -1335,7 +1335,10 @@ main (int argc, char **argv)
{ {
gsize i; gsize i;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
g_test_add_func ("/wifi/lock_bssid", g_test_add_func ("/wifi/lock_bssid",

View file

@ -577,7 +577,9 @@ main (int argc, char **argv)
{ {
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_add_func ("/dhcp/dhclient/orig_missing", test_orig_missing); g_test_add_func ("/dhcp/dhclient/orig_missing", test_orig_missing);
g_test_add_func ("/dhcp/dhclient/override_client_id", test_override_client_id); g_test_add_func ("/dhcp/dhclient/override_client_id", test_override_client_id);

View file

@ -104,7 +104,9 @@ main (int argc, char **argv)
{ {
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_add_func ("/dnsmasq-manager/address-ranges", test_address_ranges); g_test_add_func ("/dnsmasq-manager/address-ranges", test_address_ranges);

View file

@ -562,7 +562,10 @@ main (int argc, char *argv[])
nm_logging_syslog_openlog (debug); nm_logging_syslog_openlog (debug);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
dbus_threads_init_default (); dbus_threads_init_default ();
/* Ensure that non-exported properties don't leak out, and that the /* Ensure that non-exported properties don't leak out, and that the

View file

@ -123,7 +123,9 @@ dump_all (void)
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_assert (argc <= 2); g_assert (argc <= 2);
if (argc > 1 && !g_strcmp0 (argv[1], "--fake")) if (argc > 1 && !g_strcmp0 (argv[1], "--fake"))

View file

@ -10,7 +10,10 @@ main (int argc, char **argv)
{ {
GMainLoop *loop; GMainLoop *loop;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
loop = g_main_loop_new (NULL, FALSE); loop = g_main_loop_new (NULL, FALSE);
nm_logging_setup ("debug", NULL, NULL, NULL); nm_logging_setup ("debug", NULL, NULL, NULL);
openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON); openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON);

View file

@ -850,7 +850,9 @@ main (int argc, char **argv)
gboolean status = TRUE; gboolean status = TRUE;
int error; int error;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (*argv && !g_strcmp0 (argv[1], "--fake")) { if (*argv && !g_strcmp0 (argv[1], "--fake")) {
nm_fake_platform_setup (); nm_fake_platform_setup ();

View file

@ -136,7 +136,11 @@ main (int argc, char **argv)
int result; int result;
openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON); openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
/* Enable debug messages if called with --debug */ /* Enable debug messages if called with --debug */
for (; *argv; argv++) { for (; *argv; argv++) {

View file

@ -325,7 +325,9 @@ plugin_init (void)
DBusGConnection *bus; DBusGConnection *bus;
GError *err = NULL; GError *err = NULL;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_message ("nm-ppp-plugin: (%s): initializing", __func__); g_message ("nm-ppp-plugin: (%s): initializing", __func__);

View file

@ -39,7 +39,10 @@ main (int argc, char **argv)
const char *ifname; const char *ifname;
char mac[6] = { 0x02, 0xaa, 0xbb, 0xcc, 0xdd, 0xee }; char mac[6] = { 0x02, 0xaa, 0xbb, 0xcc, 0xdd, 0xee };
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
loop = g_main_loop_new (NULL, FALSE); loop = g_main_loop_new (NULL, FALSE);
nm_logging_setup ("debug", "ip6", NULL, NULL); nm_logging_setup ("debug", "ip6", NULL, NULL);
openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON); openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON);

View file

@ -14378,7 +14378,9 @@ int main (int argc, char **argv)
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
#endif #endif
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
success = nm_utils_init (&error); success = nm_utils_init (&error);
g_assert_no_error (error); g_assert_no_error (error);

View file

@ -455,7 +455,10 @@ main (int argc, char **argv)
{ {
char *f; char *f;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
nm_linux_platform_setup (); nm_linux_platform_setup ();
nm_logging_setup ("WARN", "DEFAULT", NULL, NULL); nm_logging_setup ("WARN", "DEFAULT", NULL, NULL);

View file

@ -932,7 +932,9 @@ main (int argc, char **argv)
{ {
GError *error = NULL; GError *error = NULL;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -3342,7 +3342,10 @@ int main (int argc, char **argv)
GError *error = NULL; GError *error = NULL;
char *base; char *base;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_log_set_always_fatal (G_LOG_LEVEL_MASK); g_log_set_always_fatal (G_LOG_LEVEL_MASK);
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))

View file

@ -123,7 +123,10 @@ test_defname_multiple_conflicts (void)
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
g_test_add_func ("/defname/no_connections", test_defname_no_connections); g_test_add_func ("/defname/no_connections", test_defname_no_connections);

View file

@ -500,7 +500,9 @@ int main (int argc, char **argv)
GError *error = NULL; GError *error = NULL;
char *base; char *base;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -338,7 +338,9 @@ main (int argc, char **argv)
{ {
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_add_func ("/dcb/fcoe", test_dcb_fcoe); g_test_add_func ("/dcb/fcoe", test_dcb_fcoe);
g_test_add_func ("/dcb/iscsi", test_dcb_iscsi); g_test_add_func ("/dcb/iscsi", test_dcb_iscsi);

View file

@ -848,7 +848,9 @@ int main (int argc, char **argv)
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL); g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
#endif #endif
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) if (!nm_utils_init (&error))
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);

View file

@ -558,7 +558,9 @@ main (int argc, char **argv)
{ {
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_add_func ("/general/nm_utils_ascii_str_to_int64", test_nm_utils_ascii_str_to_int64); g_test_add_func ("/general/nm_utils_ascii_str_to_int64", test_nm_utils_ascii_str_to_int64);
g_test_add_func ("/general/nm_utils_ip6_address_clear_host_address", test_nm_utils_ip6_address_clear_host_address); g_test_add_func ("/general/nm_utils_ip6_address_clear_host_address", test_nm_utils_ip6_address_clear_host_address);

View file

@ -340,7 +340,9 @@ main (int argc, char **argv)
{ {
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
g_test_add_func ("/ip4-config/subtract", test_subtract); g_test_add_func ("/ip4-config/subtract", test_subtract);
g_test_add_func ("/ip4-config/compare-with-source", test_compare_with_source); g_test_add_func ("/ip4-config/compare-with-source", test_compare_with_source);

View file

@ -208,7 +208,7 @@ main (int argc, char **argv)
{ {
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
#if !GLIB_CHECK_VERSION (2,36,0) #if !GLIB_CHECK_VERSION (2,35,0)
g_type_init (); g_type_init ();
#endif #endif

View file

@ -260,7 +260,9 @@ int main (int argc, char **argv)
DBusConnection *connection; DBusConnection *connection;
DBusError error; DBusError error;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
dbus_error_init (&error); dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error); connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);

View file

@ -159,7 +159,9 @@ main (int argc, char *argv[])
return 2; return 2;
} }
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
client = nm_client_new (); client = nm_client_new ();
if (!client) { if (!client) {

View file

@ -408,7 +408,9 @@ main (int argc, char *argv[])
usage (argv[0]); usage (argv[0]);
} }
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init (); g_type_init ();
#endif
if (!nm_utils_init (&error)) { if (!nm_utils_init (&error)) {
fprintf (stderr, "ERR: failed to initialize libnm-util: %s", error->message); fprintf (stderr, "ERR: failed to initialize libnm-util: %s", error->message);