Commit 0184447d authored by Stef Walter's avatar Stef Walter

Fix for deprecations in glib 2.35.0

 * g_type_init() was deprecated
parent 051d70fc
......@@ -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,
......
......@@ -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 */
......
......@@ -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");
......
......@@ -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");
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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)
......
......@@ -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 ();
......
......@@ -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 */
......
......@@ -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 ();
......
......@@ -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");
......
......@@ -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 ();
......
......@@ -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);
......
......@@ -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 ();
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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",
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment