]> git.street.me.uk Git - andy/viking.git/blobdiff - src/googlesearch.c
[QA] Remove unused function parameter
[andy/viking.git] / src / googlesearch.c
index 67c113087678540cbdd7f7f8d6184b1da5e190e3..e8bf181c9353fb4b437576e94718bdfac63ed2bd 100644 (file)
 
 #include "googlesearch.h"
 
+/* Compatibility */
+#if ! GLIB_CHECK_VERSION(2,22,0)
+#define g_mapped_file_unref g_mapped_file_free
+#endif
+
 #define GOOGLE_GOTO_URL_FMT "http://maps.google.com/maps?q=%s&output=js"
 #define GOOGLE_GOTO_PATTERN_1 "{center:{lat:"
 #define GOOGLE_GOTO_PATTERN_2 ",lng:"
 #define GOOGLE_GOTO_NOT_FOUND "not understand the location"
 
-static DownloadMapOptions googlesearch_options = { FALSE, FALSE, "http://maps.google.com/", 0, a_check_map_file };
+static DownloadMapOptions googlesearch_options = { FALSE, FALSE, "http://maps.google.com/", 2, a_check_map_file, NULL };
 
 static void google_goto_tool_finalize ( GObject *gob );
 
@@ -143,7 +148,7 @@ static gboolean google_goto_tool_parse_file_for_latlon(VikGotoTool *self, gchar
   ll->lon = g_ascii_strtod(lon_buf, NULL);
 
 done:
-  g_mapped_file_free(mf);
+  g_mapped_file_unref(mf);
   return (found);
 
 }