[Libosinfo] [PATCH 2/2] Remove checks/code for GLib older than 2.35.1
Fabiano Fidêncio
fidencio at redhat.com
Thu Jan 7 13:33:11 UTC 2016
As now we depend on GLib 2.36, let's remove all checks/code that depend
on an older version than the one we require.
---
test/test-db.c | 4 ----
test/test-device.c | 4 ----
test/test-devicelist.c | 4 ----
test/test-entity.c | 4 ----
test/test-filter.c | 4 ----
test/test-install-script.c | 4 ----
test/test-isodetect.c | 4 ----
test/test-list.c | 4 ----
test/test-loader.c | 4 ----
test/test-mediauris.c | 4 ----
test/test-os.c | 4 ----
test/test-oslist.c | 4 ----
test/test-platform.c | 4 ----
test/test-platformlist.c | 4 ----
test/test-product.c | 4 ----
test/test-productfilter.c | 4 ----
test/test-treeuris.c | 4 ----
tools/osinfo-db-validate.c | 4 ----
tools/osinfo-detect.c | 4 ----
tools/osinfo-install-script.c | 4 ----
tools/osinfo-query.c | 4 ----
21 files changed, 84 deletions(-)
diff --git a/test/test-db.c b/test/test-db.c
index df586f6..efb9fd4 100644
--- a/test/test-db.c
+++ b/test/test-db.c
@@ -422,10 +422,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_db_get_type();
diff --git a/test/test-device.c b/test/test-device.c
index 72f8e8c..a410e37 100644
--- a/test/test-device.c
+++ b/test/test-device.c
@@ -55,10 +55,6 @@ int main(void)
Suite *s = device_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_device_get_type();
diff --git a/test/test-devicelist.c b/test/test-devicelist.c
index 02f0ff7..f06efcd 100644
--- a/test/test-devicelist.c
+++ b/test/test-devicelist.c
@@ -224,10 +224,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_device_get_type();
osinfo_devicelist_get_type();
diff --git a/test/test-entity.c b/test/test-entity.c
index 03dc570..3629e5b 100644
--- a/test/test-entity.c
+++ b/test/test-entity.c
@@ -335,10 +335,6 @@ int main(void)
Suite *s = entity_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_dummy_get_type();
diff --git a/test/test-filter.c b/test/test-filter.c
index aa4fb72..fc50357 100644
--- a/test/test-filter.c
+++ b/test/test-filter.c
@@ -172,10 +172,6 @@ int main(void)
Suite *s = filter_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_device_get_type();
osinfo_filter_get_type();
diff --git a/test/test-install-script.c b/test/test-install-script.c
index 4d994e7..08d7f76 100644
--- a/test/test-install-script.c
+++ b/test/test-install-script.c
@@ -327,10 +327,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_db_get_type();
diff --git a/test/test-isodetect.c b/test/test-isodetect.c
index 3590205..0ca00f9 100644
--- a/test/test-isodetect.c
+++ b/test/test-isodetect.c
@@ -481,10 +481,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_db_get_type();
diff --git a/test/test-list.c b/test/test-list.c
index fac27b5..007c362 100644
--- a/test/test-list.c
+++ b/test/test-list.c
@@ -414,10 +414,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_dummy_get_type();
osinfo_dummy_list_get_type();
diff --git a/test/test-loader.c b/test/test-loader.c
index 0f83b49..8f796d8 100644
--- a/test/test-loader.c
+++ b/test/test-loader.c
@@ -55,10 +55,6 @@ int main(void)
Suite *s = loader_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_db_get_type();
diff --git a/test/test-mediauris.c b/test/test-mediauris.c
index b2fede2..b73dcbc 100644
--- a/test/test-mediauris.c
+++ b/test/test-mediauris.c
@@ -128,10 +128,6 @@ int main(void)
if (!g_getenv("LIBOSINFO_NETWORK_TESTS"))
return 77; /* Skip */
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_db_get_type();
diff --git a/test/test-os.c b/test/test-os.c
index 8ee2403..604b289 100644
--- a/test/test-os.c
+++ b/test/test-os.c
@@ -213,10 +213,6 @@ int main(void)
Suite *s = os_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_platform_get_type();
osinfo_device_get_type();
diff --git a/test/test-oslist.c b/test/test-oslist.c
index 765d546..71d55a4 100644
--- a/test/test-oslist.c
+++ b/test/test-oslist.c
@@ -224,10 +224,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_os_get_type();
osinfo_oslist_get_type();
diff --git a/test/test-platform.c b/test/test-platform.c
index 6f05b83..80b28db 100644
--- a/test/test-platform.c
+++ b/test/test-platform.c
@@ -131,10 +131,6 @@ int main(void)
Suite *s = platform_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_platform_get_type();
osinfo_device_get_type();
diff --git a/test/test-platformlist.c b/test/test-platformlist.c
index e1b1d13..ec53549 100644
--- a/test/test-platformlist.c
+++ b/test/test-platformlist.c
@@ -224,10 +224,6 @@ int main(void)
Suite *s = list_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_platform_get_type();
osinfo_platformlist_get_type();
diff --git a/test/test-product.c b/test/test-product.c
index f6b30fa..1e4e2d6 100644
--- a/test/test-product.c
+++ b/test/test-product.c
@@ -205,10 +205,6 @@ int main(void)
Suite *s = product_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_platform_get_type();
osinfo_device_get_type();
diff --git a/test/test-productfilter.c b/test/test-productfilter.c
index 57d6fc4..8e1fed8 100644
--- a/test/test-productfilter.c
+++ b/test/test-productfilter.c
@@ -243,10 +243,6 @@ int main(void)
Suite *s = productfilter_suite();
SRunner *sr = srunner_create(s);
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_filter_get_type();
diff --git a/test/test-treeuris.c b/test/test-treeuris.c
index 9176919..0ddfe4f 100644
--- a/test/test-treeuris.c
+++ b/test/test-treeuris.c
@@ -128,10 +128,6 @@ int main(void)
if (!g_getenv("LIBOSINFO_NETWORK_TESTS"))
return 77; /* Skip */
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
/* Upfront so we don't confuse valgrind */
osinfo_entity_get_type();
osinfo_db_get_type();
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index f53aebe..965ed0e 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -256,10 +256,6 @@ gint main(gint argc, gchar **argv)
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
context = g_option_context_new(_("- Validate XML documents "));
g_option_context_add_main_entries(context, entries, GETTEXT_PACKAGE);
diff --git a/tools/osinfo-detect.c b/tools/osinfo-detect.c
index fae7b21..2e5af97 100644
--- a/tools/osinfo-detect.c
+++ b/tools/osinfo-detect.c
@@ -240,10 +240,6 @@ gint main(gint argc, gchar **argv)
goto EXIT;
}
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
loader = osinfo_loader_new();
osinfo_loader_process_default_path(loader, &error);
if (error != NULL) {
diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index b924cd9..915d07e 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -304,10 +304,6 @@ gint main(gint argc, gchar **argv)
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
config = osinfo_install_config_new("http://libosinfo.fedorahosted.org/config");
context = g_option_context_new(_("- Generate an OS install script"));
diff --git a/tools/osinfo-query.c b/tools/osinfo-query.c
index 43ded4f..66f49e2 100644
--- a/tools/osinfo-query.c
+++ b/tools/osinfo-query.c
@@ -366,10 +366,6 @@ gint main(gint argc, gchar **argv)
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#if !GLIB_CHECK_VERSION(2,35,1)
- g_type_init();
-#endif
-
struct OsinfoType types[] = {
{ "os",
(osinfo_list_func)osinfo_db_get_os_list,
--
2.5.0
More information about the Libosinfo
mailing list