discoverer: add casts to avoid warnings in osx builds

Fix the following warnings by adding casts.

gstdiscoverer.c:1801:17: error: format specifies type 'unsigned long' but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
      location, file_status.st_size, file_status.st_mtime);
                ^~~~~~~~~~~~~~~~~~~
gstdiscoverer.c:1801:38: error: format specifies type 'long long' but the argument has type '__darwin_time_t' (aka 'long') [-Werror,-Wformat]
      location, file_status.st_size, file_status.st_mtime);

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/570
This commit is contained in:
Josep Torra 2019-03-21 17:21:30 +01:00
parent eadeec791a
commit a1cc9ea6a9

View file

@ -1798,7 +1798,7 @@ _serialized_info_get_path (GstDiscoverer * dc, gchar * uri)
}
tmp = g_strdup_printf ("%s-%" G_GSIZE_FORMAT "-%" G_GINT64_FORMAT,
location, file_status.st_size, file_status.st_mtime);
location, (gsize) file_status.st_size, (gint64) file_status.st_mtime);
cs = g_checksum_new (G_CHECKSUM_SHA1);
g_checksum_update (cs, (const guchar *) tmp, strlen (tmp));
checksum = g_checksum_get_string (cs);