[gnome-keyring] Fix for deprecations in glib 2.35.0



commit 0184447d6a6930e7fab1b6f3df97e89b81809c7e
Author: Stef Walter <stefw gnome org>
Date:   Mon Oct 22 16:55:39 2012 +0200

    Fix for deprecations in glib 2.35.0
    
     * g_type_init() was deprecated

 daemon/dbus/tests/test-secret-signals.c            |    2 ++
 daemon/gkd-main.c                                  |    2 ++
 daemon/gpg-agent/gkd-gpg-agent-standalone.c        |    2 ++
 daemon/ssh-agent/gkd-ssh-agent-standalone.c        |    2 ++
 pkcs11/gkm/tests/test-attributes.c                 |    2 ++
 pkcs11/gkm/tests/test-certificate.c                |    2 ++
 pkcs11/gkm/tests/test-credential.c                 |    2 ++
 pkcs11/gkm/tests/test-data-asn1.c                  |    2 ++
 pkcs11/gkm/tests/test-data-der.c                   |    2 ++
 pkcs11/gkm/tests/test-file-tracker.c               |    2 ++
 pkcs11/gkm/tests/test-memory-store.c               |    2 ++
 pkcs11/gkm/tests/test-object.c                     |    2 ++
 pkcs11/gkm/tests/test-secret.c                     |    2 ++
 pkcs11/gkm/tests/test-sexp.c                       |    2 ++
 pkcs11/gkm/tests/test-store.c                      |    2 ++
 pkcs11/gkm/tests/test-timer.c                      |    2 ++
 pkcs11/gkm/tests/test-transaction.c                |    2 ++
 pkcs11/gnome2-store/gkm-gnome2-standalone.c        |    2 ++
 pkcs11/gnome2-store/tests/check-gnome2-module.c    |    2 ++
 pkcs11/gnome2-store/tests/frob-gnome2-file.c       |    2 ++
 pkcs11/gnome2-store/tests/test-gnome2-file.c       |    2 ++
 .../gnome2-store/tests/test-gnome2-private-key.c   |    2 ++
 pkcs11/gnome2-store/tests/test-gnome2-storage.c    |    2 ++
 pkcs11/gnome2-store/tests/test-import.c            |    2 ++
 pkcs11/roots-store/gkm-roots-standalone.c          |    2 ++
 pkcs11/roots-store/tests/check-roots-module.c      |    2 ++
 pkcs11/secret-store/gkm-secret-standalone.c        |    2 ++
 pkcs11/secret-store/tests/test-secret-binary.c     |    2 ++
 pkcs11/secret-store/tests/test-secret-collection.c |    2 ++
 pkcs11/secret-store/tests/test-secret-data.c       |    2 ++
 pkcs11/secret-store/tests/test-secret-fields.c     |    2 ++
 pkcs11/secret-store/tests/test-secret-item.c       |    2 ++
 pkcs11/secret-store/tests/test-secret-object.c     |    2 ++
 pkcs11/secret-store/tests/test-secret-schema.c     |    2 ++
 pkcs11/secret-store/tests/test-secret-search.c     |    2 ++
 pkcs11/secret-store/tests/test-secret-textual.c    |    2 ++
 pkcs11/ssh-store/gkm-ssh-standalone.c              |    2 ++
 pkcs11/ssh-store/tests/check-ssh-module.c          |    2 ++
 pkcs11/ssh-store/tests/test-private-key.c          |    2 ++
 pkcs11/ssh-store/tests/test-ssh-openssh.c          |    2 ++
 pkcs11/wrap-layer/tests/test-create-credential.c   |    2 ++
 pkcs11/wrap-layer/tests/test-init-pin.c            |    2 ++
 pkcs11/wrap-layer/tests/test-login-auto.c          |    2 ++
 pkcs11/wrap-layer/tests/test-login-hints.c         |    2 ++
 pkcs11/wrap-layer/tests/test-login-keyring.c       |    2 ++
 pkcs11/wrap-layer/tests/test-login-specific.c      |    2 ++
 pkcs11/wrap-layer/tests/test-login-user.c          |    2 ++
 pkcs11/wrap-layer/tests/test-set-pin.c             |    2 ++
 pkcs11/xdg-store/gkm-xdg-standalone.c              |    2 ++
 pkcs11/xdg-store/tests/check-xdg-module.c          |    2 ++
 pkcs11/xdg-store/tests/test-xdg-module.c           |    2 ++
 pkcs11/xdg-store/tests/test-xdg-trust.c            |    2 ++
 tool/gkr-tool.c                                    |    4 +++-
 53 files changed, 107 insertions(+), 1 deletions(-)
---
diff --git a/daemon/dbus/tests/test-secret-signals.c b/daemon/dbus/tests/test-secret-signals.c
index e28c83d..4561c4b 100644
--- a/daemon/dbus/tests/test-secret-signals.c
+++ b/daemon/dbus/tests/test-secret-signals.c
@@ -888,7 +888,9 @@ test_item_changed (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-signals/collection-created", Test, NULL,
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index 84dd32d..1d10132 100644
--- a/daemon/gkd-main.c
+++ b/daemon/gkd-main.c
@@ -912,7 +912,9 @@ main (int argc, char *argv[])
 		g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
 #endif
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 #ifdef HAVE_LOCALE_H
 	/* internationalisation */
diff --git a/daemon/gpg-agent/gkd-gpg-agent-standalone.c b/daemon/gpg-agent/gkd-gpg-agent-standalone.c
index 48220b1..1703f6c 100644
--- a/daemon/gpg-agent/gkd-gpg-agent-standalone.c
+++ b/daemon/gpg-agent/gkd-gpg-agent-standalone.c
@@ -77,7 +77,9 @@ main(int argc, char *argv[])
 	gboolean ret;
 	int sock;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	if (argc <= 1) {
 		g_message ("specify pkcs11 module on the command line");
diff --git a/daemon/ssh-agent/gkd-ssh-agent-standalone.c b/daemon/ssh-agent/gkd-ssh-agent-standalone.c
index f5f3dc0..e865a5e 100644
--- a/daemon/ssh-agent/gkd-ssh-agent-standalone.c
+++ b/daemon/ssh-agent/gkd-ssh-agent-standalone.c
@@ -78,7 +78,9 @@ main(int argc, char *argv[])
 	gboolean ret;
 	int sock;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	if (argc <= 1) {
 		g_message ("specify pkcs11 module on the command line");
diff --git a/pkcs11/gkm/tests/test-attributes.c b/pkcs11/gkm/tests/test-attributes.c
index 18e2072..f648d54 100644
--- a/pkcs11/gkm/tests/test-attributes.c
+++ b/pkcs11/gkm/tests/test-attributes.c
@@ -844,7 +844,9 @@ test_template_set_replace (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/gkm/attributes/attribute_equal_zero_len_null_ptr", test_attribute_equal_zero_len_null_ptr);
diff --git a/pkcs11/gkm/tests/test-certificate.c b/pkcs11/gkm/tests/test-certificate.c
index a1f5fe5..65c2e76 100644
--- a/pkcs11/gkm/tests/test-certificate.c
+++ b/pkcs11/gkm/tests/test-certificate.c
@@ -191,7 +191,9 @@ test_hash (Test* test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/certificate/issuer", Test, NULL, setup, test_attribute_issuer, teardown);
diff --git a/pkcs11/gkm/tests/test-credential.c b/pkcs11/gkm/tests/test-credential.c
index ca94137..84f94fa 100644
--- a/pkcs11/gkm/tests/test-credential.c
+++ b/pkcs11/gkm/tests/test-credential.c
@@ -356,7 +356,9 @@ test_value_is_inaccessible_to_applications (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/credential/create", Test, NULL, setup, test_create, teardown);
diff --git a/pkcs11/gkm/tests/test-data-asn1.c b/pkcs11/gkm/tests/test-data-asn1.c
index e380887..eb39b21 100644
--- a/pkcs11/gkm/tests/test-data-asn1.c
+++ b/pkcs11/gkm/tests/test-data-asn1.c
@@ -105,7 +105,9 @@ test_asn1_integers (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/data-asn1/integers", Test, NULL, setup, test_asn1_integers, teardown);
diff --git a/pkcs11/gkm/tests/test-data-der.c b/pkcs11/gkm/tests/test-data-der.c
index 0e74027..2370c1e 100644
--- a/pkcs11/gkm/tests/test-data-der.c
+++ b/pkcs11/gkm/tests/test-data-der.c
@@ -588,7 +588,9 @@ test_write_pkcs8_encrypted (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/data-der/der_rsa_public", Test, NULL, setup, test_der_rsa_public, teardown);
diff --git a/pkcs11/gkm/tests/test-file-tracker.c b/pkcs11/gkm/tests/test-file-tracker.c
index 1e606e3..154ba3f 100644
--- a/pkcs11/gkm/tests/test-file-tracker.c
+++ b/pkcs11/gkm/tests/test-file-tracker.c
@@ -233,7 +233,9 @@ test_nomatch (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/file-tracker/file_watch", Test, NULL, setup, test_file_watch, teardown);
diff --git a/pkcs11/gkm/tests/test-memory-store.c b/pkcs11/gkm/tests/test-memory-store.c
index 07c6b0e..f3feb7b 100644
--- a/pkcs11/gkm/tests/test-memory-store.c
+++ b/pkcs11/gkm/tests/test-memory-store.c
@@ -459,7 +459,9 @@ test_set_object_gone_first (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/memory-test->store/get_attribute_default", Test, NULL, setup, test_get_attribute_default, teardown);
diff --git a/pkcs11/gkm/tests/test-object.c b/pkcs11/gkm/tests/test-object.c
index 00fa770..760a2b8 100644
--- a/pkcs11/gkm/tests/test-object.c
+++ b/pkcs11/gkm/tests/test-object.c
@@ -290,7 +290,9 @@ test_expose_transaction (Test* test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/object/create_destroy_transient", Test, NULL, setup, test_create_destroy_transient, teardown);
diff --git a/pkcs11/gkm/tests/test-secret.c b/pkcs11/gkm/tests/test-secret.c
index e8fc58d..4025114 100644
--- a/pkcs11/gkm/tests/test-secret.c
+++ b/pkcs11/gkm/tests/test-secret.c
@@ -191,7 +191,9 @@ test_equal (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/gkm/secret/secret", test_secret);
diff --git a/pkcs11/gkm/tests/test-sexp.c b/pkcs11/gkm/tests/test-sexp.c
index 3d9e039..d20e9d8 100644
--- a/pkcs11/gkm/tests/test-sexp.c
+++ b/pkcs11/gkm/tests/test-sexp.c
@@ -144,7 +144,9 @@ test_key_to_public (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/sexp/parse_key", Test, NULL, setup, test_parse_key, teardown);
diff --git a/pkcs11/gkm/tests/test-store.c b/pkcs11/gkm/tests/test-store.c
index 4dab4c4..7ac5f1b 100644
--- a/pkcs11/gkm/tests/test-store.c
+++ b/pkcs11/gkm/tests/test-store.c
@@ -92,7 +92,9 @@ test_schema_flags (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/store/schema", Test, NULL, setup, test_schema, teardown);
diff --git a/pkcs11/gkm/tests/test-timer.c b/pkcs11/gkm/tests/test-timer.c
index 3035786..92f12da 100644
--- a/pkcs11/gkm/tests/test-timer.c
+++ b/pkcs11/gkm/tests/test-timer.c
@@ -161,7 +161,9 @@ test_outstanding (Test* test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/timer/extra_initialize", Test, NULL, setup, test_extra_initialize, teardown);
diff --git a/pkcs11/gkm/tests/test-transaction.c b/pkcs11/gkm/tests/test-transaction.c
index 8725f77..9cbdcb3 100644
--- a/pkcs11/gkm/tests/test-transaction.c
+++ b/pkcs11/gkm/tests/test-transaction.c
@@ -517,7 +517,9 @@ test_unique_file_no_conflict (Test* test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gkm/transaction/transaction_empty", Test, NULL, setup, test_transaction_empty, teardown);
diff --git a/pkcs11/gnome2-store/gkm-gnome2-standalone.c b/pkcs11/gnome2-store/gkm-gnome2-standalone.c
index 102a46a..5d5b9ad 100644
--- a/pkcs11/gnome2-store/gkm-gnome2-standalone.c
+++ b/pkcs11/gnome2-store/gkm-gnome2-standalone.c
@@ -42,7 +42,9 @@ C_GetFunctionList (CK_FUNCTION_LIST_PTR_PTR list)
 	if (!list)
 		return CKR_ARGUMENTS_BAD;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	*list = gkm_gnome2_store_get_functions ();
 	return CKR_OK;
diff --git a/pkcs11/gnome2-store/tests/check-gnome2-module.c b/pkcs11/gnome2-store/tests/check-gnome2-module.c
index d5f4600..e70000e 100644
--- a/pkcs11/gnome2-store/tests/check-gnome2-module.c
+++ b/pkcs11/gnome2-store/tests/check-gnome2-module.c
@@ -52,7 +52,9 @@ on_p11_tests_log (int level, const char *section, const char *message)
 int
 main (int argc, const char *argv[])
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	p11_tests_set_log_func (on_p11_tests_log);
 	p11_tests_set_unexpected (1);
diff --git a/pkcs11/gnome2-store/tests/frob-gnome2-file.c b/pkcs11/gnome2-store/tests/frob-gnome2-file.c
index 4667a90..3ace35b 100644
--- a/pkcs11/gnome2-store/tests/frob-gnome2-file.c
+++ b/pkcs11/gnome2-store/tests/frob-gnome2-file.c
@@ -61,7 +61,9 @@ main(int argc, char* argv[])
 	GkmSecret *login;
 	int fd;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	gkm_crypto_initialize ();
 
 	if (argc != 2)
diff --git a/pkcs11/gnome2-store/tests/test-gnome2-file.c b/pkcs11/gnome2-store/tests/test-gnome2-file.c
index 3ab97a2..34fd807 100644
--- a/pkcs11/gnome2-store/tests/test-gnome2-file.c
+++ b/pkcs11/gnome2-store/tests/test-gnome2-file.c
@@ -613,7 +613,9 @@ test_have_sections (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	egg_libgcrypt_initialize ();
diff --git a/pkcs11/gnome2-store/tests/test-gnome2-private-key.c b/pkcs11/gnome2-store/tests/test-gnome2-private-key.c
index 127e3b4..8efd66f 100644
--- a/pkcs11/gnome2-store/tests/test-gnome2-private-key.c
+++ b/pkcs11/gnome2-store/tests/test-gnome2-private-key.c
@@ -249,7 +249,9 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	/* Suppress these messages in tests */
diff --git a/pkcs11/gnome2-store/tests/test-gnome2-storage.c b/pkcs11/gnome2-store/tests/test-gnome2-storage.c
index d3f315b..fefe476 100644
--- a/pkcs11/gnome2-store/tests/test-gnome2-storage.c
+++ b/pkcs11/gnome2-store/tests/test-gnome2-storage.c
@@ -459,7 +459,9 @@ null_log_handler (const gchar *log_domain,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	egg_libgcrypt_initialize ();
diff --git a/pkcs11/gnome2-store/tests/test-import.c b/pkcs11/gnome2-store/tests/test-import.c
index 56b71bb..15158e5 100644
--- a/pkcs11/gnome2-store/tests/test-import.c
+++ b/pkcs11/gnome2-store/tests/test-import.c
@@ -168,7 +168,9 @@ null_log_handler (const gchar *log_domain,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_set_prgname ("test-import");
diff --git a/pkcs11/roots-store/gkm-roots-standalone.c b/pkcs11/roots-store/gkm-roots-standalone.c
index bceb232..3d4d363 100644
--- a/pkcs11/roots-store/gkm-roots-standalone.c
+++ b/pkcs11/roots-store/gkm-roots-standalone.c
@@ -57,7 +57,9 @@ C_GetFunctionList (CK_FUNCTION_LIST_PTR_PTR list)
 	if (!list)
 		return CKR_ARGUMENTS_BAD;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	gkm_crypto_initialize ();
 
diff --git a/pkcs11/roots-store/tests/check-roots-module.c b/pkcs11/roots-store/tests/check-roots-module.c
index c73a188..0b46b17 100644
--- a/pkcs11/roots-store/tests/check-roots-module.c
+++ b/pkcs11/roots-store/tests/check-roots-module.c
@@ -52,7 +52,9 @@ on_p11_tests_log (int level, const char *section, const char *message)
 int
 main (int argc, const char *argv[])
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	p11_tests_set_log_func (on_p11_tests_log);
 	p11_tests_set_unexpected (1);
diff --git a/pkcs11/secret-store/gkm-secret-standalone.c b/pkcs11/secret-store/gkm-secret-standalone.c
index cfc3956..cd3cf04 100644
--- a/pkcs11/secret-store/gkm-secret-standalone.c
+++ b/pkcs11/secret-store/gkm-secret-standalone.c
@@ -57,7 +57,9 @@ C_GetFunctionList (CK_FUNCTION_LIST_PTR_PTR list)
 	if (!list)
 		return CKR_ARGUMENTS_BAD;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	gkm_crypto_initialize ();
 
diff --git a/pkcs11/secret-store/tests/test-secret-binary.c b/pkcs11/secret-store/tests/test-secret-binary.c
index a18803c..3af087d 100644
--- a/pkcs11/secret-store/tests/test-secret-binary.c
+++ b/pkcs11/secret-store/tests/test-secret-binary.c
@@ -248,7 +248,9 @@ test_read_with_schema (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/binary/read_encrypted", Test, NULL, setup, test_read_encrypted, teardown);
diff --git a/pkcs11/secret-store/tests/test-secret-collection.c b/pkcs11/secret-store/tests/test-secret-collection.c
index 203d8ab..c9cdebb 100644
--- a/pkcs11/secret-store/tests/test-secret-collection.c
+++ b/pkcs11/secret-store/tests/test-secret-collection.c
@@ -570,7 +570,9 @@ test_token_item_remove (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/collection/is_locked", Test, NULL, setup, test_is_locked, teardown);
diff --git a/pkcs11/secret-store/tests/test-secret-data.c b/pkcs11/secret-store/tests/test-secret-data.c
index c1bf54b..3ecf788 100644
--- a/pkcs11/secret-store/tests/test-secret-data.c
+++ b/pkcs11/secret-store/tests/test-secret-data.c
@@ -228,7 +228,9 @@ test_get_set_master (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/secret-store/data/new", test_new);
diff --git a/pkcs11/secret-store/tests/test-secret-fields.c b/pkcs11/secret-store/tests/test-secret-fields.c
index 50763d6..975b208 100644
--- a/pkcs11/secret-store/tests/test-secret-fields.c
+++ b/pkcs11/secret-store/tests/test-secret-fields.c
@@ -476,7 +476,9 @@ test_match_wrong_hashed (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/secret-store/fields/new", test_new);
diff --git a/pkcs11/secret-store/tests/test-secret-item.c b/pkcs11/secret-store/tests/test-secret-item.c
index 2198cf2..808d78c 100644
--- a/pkcs11/secret-store/tests/test-secret-item.c
+++ b/pkcs11/secret-store/tests/test-secret-item.c
@@ -456,7 +456,9 @@ test_fields_attr_reverts (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/item/new", Test, NULL, setup, test_new, teardown);
diff --git a/pkcs11/secret-store/tests/test-secret-object.c b/pkcs11/secret-store/tests/test-secret-object.c
index db235cb..be33ff5 100644
--- a/pkcs11/secret-store/tests/test-secret-object.c
+++ b/pkcs11/secret-store/tests/test-secret-object.c
@@ -281,7 +281,9 @@ test_locked_get_attr (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/object/is_locked", Test, NULL, setup, test_is_locked, teardown);
diff --git a/pkcs11/secret-store/tests/test-secret-schema.c b/pkcs11/secret-store/tests/test-secret-schema.c
index 22ef8c5..68c2709 100644
--- a/pkcs11/secret-store/tests/test-secret-schema.c
+++ b/pkcs11/secret-store/tests/test-secret-schema.c
@@ -220,7 +220,9 @@ test_match_unknown_xdg_schema_without_schema_locked (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/schema/network-xdg-schema-without-schema-unlocked",
diff --git a/pkcs11/secret-store/tests/test-secret-search.c b/pkcs11/secret-store/tests/test-secret-search.c
index fc75996..1df4c71 100644
--- a/pkcs11/secret-store/tests/test-secret-search.c
+++ b/pkcs11/secret-store/tests/test-secret-search.c
@@ -435,7 +435,9 @@ test_order (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/search/new", Test, NULL, setup, test_new, teardown);
diff --git a/pkcs11/secret-store/tests/test-secret-textual.c b/pkcs11/secret-store/tests/test-secret-textual.c
index 87bc408..b1f8ab3 100644
--- a/pkcs11/secret-store/tests/test-secret-textual.c
+++ b/pkcs11/secret-store/tests/test-secret-textual.c
@@ -214,7 +214,9 @@ test_read_with_schema (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/secret-store/search/read", Test, NULL, setup, test_read, teardown);
diff --git a/pkcs11/ssh-store/gkm-ssh-standalone.c b/pkcs11/ssh-store/gkm-ssh-standalone.c
index 3b53f48..cee6dca 100644
--- a/pkcs11/ssh-store/gkm-ssh-standalone.c
+++ b/pkcs11/ssh-store/gkm-ssh-standalone.c
@@ -57,7 +57,9 @@ C_GetFunctionList (CK_FUNCTION_LIST_PTR_PTR list)
 	if (!list)
 		return CKR_ARGUMENTS_BAD;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	*list = gkm_ssh_store_get_functions ();
 	return CKR_OK;
diff --git a/pkcs11/ssh-store/tests/check-ssh-module.c b/pkcs11/ssh-store/tests/check-ssh-module.c
index a52dd2e..a5ecfe9 100644
--- a/pkcs11/ssh-store/tests/check-ssh-module.c
+++ b/pkcs11/ssh-store/tests/check-ssh-module.c
@@ -52,7 +52,9 @@ on_p11_tests_log (int level, const char *section, const char *message)
 int
 main (int argc, const char *argv[])
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	p11_tests_set_log_func (on_p11_tests_log);
 	p11_tests_set_unexpected (1);
diff --git a/pkcs11/ssh-store/tests/test-private-key.c b/pkcs11/ssh-store/tests/test-private-key.c
index 94833ec..9d77b6e 100644
--- a/pkcs11/ssh-store/tests/test-private-key.c
+++ b/pkcs11/ssh-store/tests/test-private-key.c
@@ -127,7 +127,9 @@ test_internal_sha1_compat (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/ssh-store/private-key/parse_plain", Test, NULL, setup_basic, test_parse_plain, teardown_basic);
diff --git a/pkcs11/ssh-store/tests/test-ssh-openssh.c b/pkcs11/ssh-store/tests/test-ssh-openssh.c
index a2e5865..0ea7619 100644
--- a/pkcs11/ssh-store/tests/test-ssh-openssh.c
+++ b/pkcs11/ssh-store/tests/test-ssh-openssh.c
@@ -127,7 +127,9 @@ test_parse_private (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/ssh-store/openssh/parse_private", test_parse_private);
diff --git a/pkcs11/wrap-layer/tests/test-create-credential.c b/pkcs11/wrap-layer/tests/test-create-credential.c
index d0b544d..c6a1a3f 100644
--- a/pkcs11/wrap-layer/tests/test-create-credential.c
+++ b/pkcs11/wrap-layer/tests/test-create-credential.c
@@ -169,7 +169,9 @@ test_cancel_immediately (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/create-credential/ok_password", Test, NULL, setup, test_ok_password, teardown);
diff --git a/pkcs11/wrap-layer/tests/test-init-pin.c b/pkcs11/wrap-layer/tests/test-init-pin.c
index 5f8af50..153996e 100644
--- a/pkcs11/wrap-layer/tests/test-init-pin.c
+++ b/pkcs11/wrap-layer/tests/test-init-pin.c
@@ -105,7 +105,9 @@ test_ok_password (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/init-pin/ok_password", Test, NULL, setup, test_ok_password, teardown);
diff --git a/pkcs11/wrap-layer/tests/test-login-auto.c b/pkcs11/wrap-layer/tests/test-login-auto.c
index 789c6d6..32e236a 100644
--- a/pkcs11/wrap-layer/tests/test-login-auto.c
+++ b/pkcs11/wrap-layer/tests/test-login-auto.c
@@ -248,7 +248,9 @@ test_unlock_keyring (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/login-auto/specific", Test, NULL, setup, test_specific, teardown);
diff --git a/pkcs11/wrap-layer/tests/test-login-hints.c b/pkcs11/wrap-layer/tests/test-login-hints.c
index 48bb830..369f84b 100644
--- a/pkcs11/wrap-layer/tests/test-login-hints.c
+++ b/pkcs11/wrap-layer/tests/test-login-hints.c
@@ -55,7 +55,9 @@ test_did_unlock_fail (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/wrap-layer/login-hints/did_unlock_fail", test_did_unlock_fail);
diff --git a/pkcs11/wrap-layer/tests/test-login-keyring.c b/pkcs11/wrap-layer/tests/test-login-keyring.c
index 3c8fe5b..d6d48b4 100644
--- a/pkcs11/wrap-layer/tests/test-login-keyring.c
+++ b/pkcs11/wrap-layer/tests/test-login-keyring.c
@@ -326,7 +326,9 @@ test_lookup_remove_no_attributes (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/login-keyring/is_usable", Test, NULL, setup, test_is_usable, teardown);
diff --git a/pkcs11/wrap-layer/tests/test-login-specific.c b/pkcs11/wrap-layer/tests/test-login-specific.c
index 23a4af0..fb2c410 100644
--- a/pkcs11/wrap-layer/tests/test-login-specific.c
+++ b/pkcs11/wrap-layer/tests/test-login-specific.c
@@ -150,7 +150,9 @@ test_cancel_immediately (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/login-specific/ok_password", Test, NULL, setup, test_ok_password, teardown);
diff --git a/pkcs11/wrap-layer/tests/test-login-user.c b/pkcs11/wrap-layer/tests/test-login-user.c
index e67e89a..f099d93 100644
--- a/pkcs11/wrap-layer/tests/test-login-user.c
+++ b/pkcs11/wrap-layer/tests/test-login-user.c
@@ -163,7 +163,9 @@ test_fail_get_token_info (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/login-user/fail_unsupported_so", Test, NULL, setup, test_fail_unsupported_so, teardown);
diff --git a/pkcs11/wrap-layer/tests/test-set-pin.c b/pkcs11/wrap-layer/tests/test-set-pin.c
index de92cab..9c2444e 100644
--- a/pkcs11/wrap-layer/tests/test-set-pin.c
+++ b/pkcs11/wrap-layer/tests/test-set-pin.c
@@ -106,7 +106,9 @@ test_ok_passwords (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/wrap-layer/set-pin/ok_passwords", Test, NULL, setup, test_ok_passwords, teardown);
diff --git a/pkcs11/xdg-store/gkm-xdg-standalone.c b/pkcs11/xdg-store/gkm-xdg-standalone.c
index 8dbfa13..e9f7bb2 100644
--- a/pkcs11/xdg-store/gkm-xdg-standalone.c
+++ b/pkcs11/xdg-store/gkm-xdg-standalone.c
@@ -57,7 +57,9 @@ C_GetFunctionList (CK_FUNCTION_LIST_PTR_PTR list)
 	if (!list)
 		return CKR_ARGUMENTS_BAD;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	*list = gkm_xdg_store_get_functions ();
 	return CKR_OK;
diff --git a/pkcs11/xdg-store/tests/check-xdg-module.c b/pkcs11/xdg-store/tests/check-xdg-module.c
index 4ed03a0..c4c171c 100644
--- a/pkcs11/xdg-store/tests/check-xdg-module.c
+++ b/pkcs11/xdg-store/tests/check-xdg-module.c
@@ -52,7 +52,9 @@ on_p11_tests_log (int level, const char *section, const char *message)
 int
 main (int argc, const char *argv[])
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	p11_tests_set_log_func (on_p11_tests_log);
 	p11_tests_set_unexpected (1);
diff --git a/pkcs11/xdg-store/tests/test-xdg-module.c b/pkcs11/xdg-store/tests/test-xdg-module.c
index 86eedf8..5f37578 100644
--- a/pkcs11/xdg-store/tests/test-xdg-module.c
+++ b/pkcs11/xdg-store/tests/test-xdg-module.c
@@ -265,7 +265,9 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	/* Suppress these messages in tests */
diff --git a/pkcs11/xdg-store/tests/test-xdg-trust.c b/pkcs11/xdg-store/tests/test-xdg-trust.c
index 7fb993b..cc299aa 100644
--- a/pkcs11/xdg-store/tests/test-xdg-trust.c
+++ b/pkcs11/xdg-store/tests/test-xdg-trust.c
@@ -842,7 +842,9 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	/* Suppress these messages in tests */
diff --git a/tool/gkr-tool.c b/tool/gkr-tool.c
index f783802..89ed02d 100644
--- a/tool/gkr-tool.c
+++ b/tool/gkr-tool.c
@@ -114,8 +114,10 @@ main (int argc, char *argv[])
 {
 	CommandInfo *cmd;
 	int ret = -1;
-	
+
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 #ifdef HAVE_LOCALE_H
 	/* internationalisation */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]