]> git.street.me.uk Git - andy/viking.git/commitdiff
[QA] Prevent depreciated warnings from test programs.
authorRob Norris <rw_norris@hotmail.com>
Mon, 20 Oct 2014 20:27:59 +0000 (21:27 +0100)
committerRob Norris <rw_norris@hotmail.com>
Wed, 29 Oct 2014 00:56:36 +0000 (00:56 +0000)
test/gpx2gpx.c
test/test_vikgotoxmltool.c

index 0682d5bafda09e555d3880307ea8fbc6ad464c95..e9a6b8aa9d7e8b6334915862118c31462ecff14f 100644 (file)
@@ -4,7 +4,9 @@
 
 int main(int argc, char *argv[])
 {
-  g_type_init ();
+#if !GLIB_CHECK_VERSION (2, 36, 0)
+  g_type_init();
+#endif
   VikLayer *vl = vik_layer_create (VIK_LAYER_TRW, NULL, FALSE);
   VikTrwLayer *trw = VIK_TRW_LAYER (vl);
   a_gpx_read_file(trw, stdin);
index d58de9128a8e1c8e809d917d7a9a859f69eb4b87..d48233fee3ef7ed57c21cbaf9c6efe52d19e1280 100644 (file)
@@ -14,8 +14,10 @@ void parse(VikGotoTool *tool, gchar *filename)
 
 int main(int argc, char *argv[])
 {
+#if !GLIB_CHECK_VERSION (2, 36, 0)
   g_type_init();
-  
+#endif
+
   VikGotoXmlTool *with_element = VIK_GOTO_XML_TOOL ( g_object_new ( VIK_GOTO_XML_TOOL_TYPE, "label", "OSM",
     "url-format", "http://ws.geonames.org/search?q=%s&maxRows=1&lang=es&style=short",
     "lat-path", "/geonames/geoname/lat",