[Pkg-vala-maintainers] Bug#741100: valac-0.22: GLib handling uses deprecated functions

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sat Mar 8 16:01:37 UTC 2014


Hi Fabien,

On 08.03.2014 15:39, Fabien Givors (Debian) wrote:
> While building the enclosed xdg-autostart.vala file, I noticed some
> warnings issued by the C compiler and pointing out the use of deprecated
> function:
>
> xdg-autostart.vala.c: In function 'main':
> xdg-autostart.vala.c:704:2: warning:
> 'g_type_init' is deprecated (declared at
> /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
>    g_type_init ();
>      ^

I don't know about the others, but this one can be fixed with:
  int main (int argc, char ** argv) {
+#if GLIB_VERSION_CUR_STABLE < G_ENCODE_VERSION(2, 36)
+	// g_type_init is deprecated since 2.36
  	g_type_init ();
+#endif
  	return autostart_main (argv, argc);
  }

Best regards,
Andreas



More information about the Pkg-vala-maintainers mailing list