[tracker-miners] tracker-writeback-gstreamer: Fix unused variable warnings



commit 711d7fcbcfe683054f2d2546251a0262f00b32ea
Author: Sam Thursfield <sam afuera me uk>
Date:   Mon Jul 6 12:55:15 2020 +0200

    tracker-writeback-gstreamer: Fix unused variable warnings
    
    Move #ifdef to avoid warnings when building with GStreamer <= 1.16
    
        ../src/tracker-writeback/tracker-writeback-gstreamer.c: In function 
‘writeback_gstreamer_write_file_metadata’:
        ../src/tracker-writeback/tracker-writeback-gstreamer.c:954:32: warning: variable ‘algorithm’ set but 
not used [-Wunused-but-set-variable]
          954 |    const gchar *value = NULL, *algorithm;
              |                                ^~~~~~~~~
        ../src/tracker-writeback/tracker-writeback-gstreamer.c:954:17: warning: variable ‘value’ set but not 
used [-Wunused-but-set-variable]
          954 |    const gchar *value = NULL, *algorithm;
              |                 ^~~~~

 src/tracker-writeback/tracker-writeback-gstreamer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback-gstreamer.c 
b/src/tracker-writeback/tracker-writeback-gstreamer.c
index 92186a234..546de6019 100644
--- a/src/tracker-writeback/tracker-writeback-gstreamer.c
+++ b/src/tracker-writeback/tracker-writeback-gstreamer.c
@@ -949,6 +949,7 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile  *writeback,
                        handle_musicbrainz_tags (resource, prop, element, mb_tags);
                }
 
+#ifdef GST_TAG_ACOUSTID_FINGERPRINT
                if (g_strcmp0 (prop, "nfo:hasHash") == 0) {
                        TrackerResource *hash;
                        const gchar *value = NULL, *algorithm;
@@ -962,15 +963,14 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile  *writeback,
                                                                           "nfo:hashValue");
                        }
 
-#ifdef GST_TAG_ACOUSTID_FINGERPRINT
                        if (value && algorithm && g_strcmp0 (algorithm, "chromaprint") == 0) {
                                g_value_init (&val, G_TYPE_STRING);
                                g_value_set_string (&val, value);
                                writeback_gstreamer_set (element, GST_TAG_ACOUSTID_FINGERPRINT, &val);
                                g_value_unset (&val);
                        }
-#endif
                }
+#endif
        }
 
        writeback_gstreamer_save (element, file, error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]