After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742488 - make check fails because g_type_init() is deprecated
make check fails because g_type_init() is deprecated
Status: RESOLVED DUPLICATE of bug 782227
Product: planner
Classification: Other
Component: Build
0.14.6
Other Linux
: Normal normal
: ---
Assigned To: planner-maint
planner-maint
Depends on:
Blocks:
 
 
Reported: 2015-01-06 22:47 UTC by Ahmed Baïzid
Modified: 2017-05-06 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g_type_init() is deprecated (2.18 KB, patch)
2015-01-06 22:47 UTC, Ahmed Baïzid
none Details | Review

Description Ahmed Baïzid 2015-01-06 22:47:27 UTC
Created attachment 293989 [details] [review]
g_type_init() is deprecated

$ make check
 ...
 calendar-test.c:20:9: error: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:679) [-Werror=deprecated-declarations]
 cc1: all warnings being treated as errors


g_type_init() is deprecated.
It does nothing but refraining me from testing planner.
Comment 1 Ahmed Baïzid 2015-01-06 22:49:41 UTC
Comment on attachment 293989 [details] [review]
g_type_init() is deprecated

>diff --git a/docs/libplanner/Makefile.am b/docs/libplanner/Makefile.am
>index d4d655d..51b6f1f 100644
>--- a/docs/libplanner/Makefile.am
>+++ b/docs/libplanner/Makefile.am
>@@ -10,7 +10,7 @@ DOC_MAIN_SGML_FILE=libplanner-docs.sgml
> DOC_SOURCE_DIR=../../libplanner
> 
> # Extra options to pass to gtkdoc-scangobj
>-SCANGOBJ_OPTIONS=--type-init-func="g_type_init()" 
>+SCANGOBJ_OPTIONS=
> 
> # Extra options to supply to gtkdoc-scan
> #SCAN_OPTIONS=--deprecated-guards="GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED" 
>diff --git a/src/Makefile.am b/src/Makefile.am
>index 7191da2..538583b 100644
>diff --git a/tests/calendar-test.c b/tests/calendar-test.c
>index fa8c4ba..ac77200 100644
>--- a/tests/calendar-test.c
>+++ b/tests/calendar-test.c
>@@ -17,8 +17,6 @@ main (gint argc, gchar **argv)
>         MrpDay         *day_a, *day_b, *day_c, *def_1_id;
>         GList          *l = NULL;
> 
>-        g_type_init ();
>-
> 	app = mrp_application_new ();
> 
> 	project = mrp_project_new (NULL);
>diff --git a/tests/cmd-manager-test.c b/tests/cmd-manager-test.c
>index 6b463b0..863b1c4 100644
>--- a/tests/cmd-manager-test.c
>+++ b/tests/cmd-manager-test.c
>@@ -119,8 +119,6 @@ main (gint argc, gchar **argv)
> {
> 	ActionHistory action_history;
> 
>-        g_type_init ();
>-
> 	PlannerCmdManager *cmd_manager = planner_cmd_manager_new ();
> 
> 	/* Initialise the action history */
>diff --git a/tests/scheduler-test.c b/tests/scheduler-test.c
>index ec185de..4bdab4b 100644
>--- a/tests/scheduler-test.c
>+++ b/tests/scheduler-test.c
>@@ -227,8 +227,6 @@ main (gint argc, gchar **argv)
> 		NULL
> 	};
> 
>-        g_type_init ();
>-
> 	app = mrp_application_new ();
> 
> 	i = 0;
>diff --git a/tests/task-test.c b/tests/task-test.c
>index ab9c191..b93c9d8 100644
>--- a/tests/task-test.c
>+++ b/tests/task-test.c
>@@ -21,8 +21,6 @@ main (gint argc, gchar **argv)
> 	MrpTask        *root;
> 	MrpRelation    *relation;
> 
>-        g_type_init ();
>-
> 	app = mrp_application_new ();
> 
> 	project_start = mrp_time_from_string ("20020218", NULL);
Comment 2 Ahmed Baïzid 2015-01-14 00:36:02 UTC
The real problem is not g_type_init() but the way we are handling warnings.
If we do it the Gnome way, make check works...
See: bug 703067.

Warning appear on the console. They will be fixed.
Comment 3 Ahmed Baïzid 2017-05-06 17:40:47 UTC
No surprise, this bug reappears : bug 782227.

This bug has to be resolved. It should have been. Patches exist.
Comment 4 Andrew Miloradovsky 2017-05-06 18:51:50 UTC
The solution proposed here is a more rough one -- it simply removes the `g_type_init` call(s), instead of wrapping it into an if-macro performing the version check.
Comment 5 Ahmed Baïzid 2017-05-06 19:00:57 UTC

*** This bug has been marked as a duplicate of bug 782227 ***