Bug #3792
closedhald.c:371: error: 'g_type_init' is deprecated
100%
Description
after upgrade glib to 2.36.1 we have error:
hald.c:371: error: 'g_type_init' is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
Files
Updated by Igor Kozhukhov over 10 years ago
- File 3792_il.patch 3792_il.patch added
- Status changed from In Progress to Feedback
- % Done changed from 80 to 100
attached patch for this issue.
Updated by Peter Tribble over 10 years ago
That initial patch isn't quite right. The check for GLIB_MICRO_VERSION shouldn't be there. Just:
#if (GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION < 36)
ought to do it.
Updated by Igor Kozhukhov over 10 years ago
it is working well fro me with glib-2.36.1
i found info that this interface have been changes from glib-2.35.0
Peter Tribble wrote:
That initial patch isn't quite right. The check for GLIB_MICRO_VERSION shouldn't be there. Just:
#if (GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION < 36)
ought to do it.
Updated by Peter Tribble over 10 years ago
Igor Kozhukhov wrote:
it is working well fro me with glib-2.36.1
Yes, but try with an older version such as 2.34.3, for example - which should call g_type_init() and wouldn't as you require GLIB_MICRO_VERSION to be zero.
i found info that this interface have been changes from glib-2.35.0
Indeed; as in removed.
Peter Tribble wrote:
That initial patch isn't quite right. The check for GLIB_MICRO_VERSION shouldn't be there. Just:
#if (GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION < 36)
ought to do it.
Updated by Alexander Pyhalov over 8 years ago
I've looked at glib code and confirmed that change was done when glib version was 2.35.0.
So the correct fix is to use
#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); #endif
Webrev is here: http://cr.illumos.org/~webrev/alp/
Updated by Electric Monk over 8 years ago
- Status changed from Feedback to Closed
git commit 61f847aff0d91f3c0fc439c66e00704c78fecd84
commit 61f847aff0d91f3c0fc439c66e00704c78fecd84 Author: Alexander Pyhalov <apyhalov@gmail.com> Date: 2015-03-27T14:48:31.000Z 3792 hald.c:371: error: 'g_type_init' is deprecated Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Reviewed by: Jon Tibble <meths@btinternet.com> Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com>