svg2png: Only call deprecated g_type_init() for old glib versions.

Quells the following warning:

pdf2png.c:52:5: warning: ‘g_type_init’ is deprecated (declared at
/usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations]
     g_type_init ();
     ^
svg2png.c:47:5: warning: ‘g_type_init’ is deprecated (declared at
/usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations]
     g_type_init ();
     ^

Patch authored by arpitj01@gmail.com

Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=81197
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
Bryce Harrington 2015-07-28 17:10:33 -07:00
parent 576bb3ffee
commit 0dd5d84bae

View file

@ -44,7 +44,9 @@ int main (int argc, char *argv[])
if (argc != 3)
FAIL ("usage: svg2png input_file.svg output_file.png");
#if GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION <= 34
g_type_init ();
#endif
error = NULL;