summaryrefslogtreecommitdiff
path: root/test/svg2png.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2015-07-28 17:10:33 -0700
committerBryce Harrington <bryce@osg.samsung.com>2015-07-28 17:10:33 -0700
commit0dd5d84baef70dad68ab67ba172edeaa1b98a995 (patch)
tree8f212e9ae83b6aee6d816502eb1ec6247a614d75 /test/svg2png.c
parent576bb3ffee2318cd50ecfd4717c8e6421d61d885 (diff)
downloadcairo-0dd5d84baef70dad68ab67ba172edeaa1b98a995.tar.gz
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>
Diffstat (limited to 'test/svg2png.c')
-rw-r--r--test/svg2png.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/svg2png.c b/test/svg2png.c
index bdfbc8b1e..1eecaf7b2 100644
--- a/test/svg2png.c
+++ b/test/svg2png.c
@@ -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;