[tracker-miners/tracker-miners-2.2: 41/47] tracker-extract-raw.c: Fix compile warning
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/tracker-miners-2.2: 41/47] tracker-extract-raw.c: Fix compile warning
- Date: Mon, 5 Aug 2019 15:50:31 +0000 (UTC)
commit 3c7f163e462ec2105489d0f31a035a001e56d364
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Jul 14 12:35:53 2019 +0100
tracker-extract-raw.c: Fix compile warning
There is some witchcraft in GLib's definition of g_clear_pointer(). The
function definition is overridden by a macro in `glib/gmem.h`, and the
macro generates this warning if we cast the 'destroy' parameter to the
expected type:
[101/264] Compiling C object 'src/tracker-extract/ec38c81@@extract-raw@sha/tracker-extract-raw.c.o'.
In file included from /usr/include/glib-2.0/glib/glist.h:32,
from /usr/include/glib-2.0/glib/ghash.h:33,
from /usr/include/glib-2.0/glib.h:50,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/gexiv2/gexiv2-metadata.h:14,
from /usr/include/gexiv2/gexiv2.h:13,
from ../src/tracker-extract/tracker-extract-raw.c:24:
../src/tracker-extract/tracker-extract-raw.c: In function ‘tracker_extract_get_metadata’:
../src/tracker-extract/tracker-extract-raw.c:462:24: warning: function called through a
non-compatible type
g_clear_pointer (&ed, (GDestroyNotify) raw_exif_data_free);
^
Removing the cast prevents the warning from appearing.
src/tracker-extract/tracker-extract-raw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/tracker-extract/tracker-extract-raw.c b/src/tracker-extract/tracker-extract-raw.c
index 294741a5f..f51cb381a 100644
--- a/src/tracker-extract/tracker-extract-raw.c
+++ b/src/tracker-extract/tracker-extract-raw.c
@@ -459,7 +459,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
out:
g_clear_object (&metadata);
g_clear_object (&resource);
- g_clear_pointer (&ed, (GDestroyNotify) raw_exif_data_free);
+ g_clear_pointer (&ed, raw_exif_data_free);
g_free (filename);
g_free (nfo_orientation);
g_free (uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]