[tracker/tracker-0.6] Fixed compiler warnings
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker/tracker-0.6] Fixed compiler warnings
- Date: Wed, 24 Jun 2009 15:04:08 +0000 (UTC)
commit 8d718490fdc5216251c0458e4cc9effedd99a8c2
Author: Martyn Russell <martyn imendio com>
Date: Wed Jun 24 16:02:50 2009 +0100
Fixed compiler warnings
src/tracker-extract/tracker-extract-gstreamer.c | 4 ++++
src/tracker-extract/tracker-extract-jpeg.c | 14 +++++++++++++-
src/tracker-extract/tracker-xmp.c | 8 ++++++++
tests/tracker-extract/tracker-extract-test-utils.c | 2 +-
.../tracker-indexer/tracker-metadata-utils-test.c | 8 +++++---
5 files changed, 31 insertions(+), 5 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 3636056..b7d00fc 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -208,6 +208,8 @@ add_int_gst_tag (GHashTable *metadata,
}
}
+#ifdef ENABLE_DETAILED_METADATA
+
static void
add_double_gst_tag (GHashTable *metadata,
const gchar *key,
@@ -226,6 +228,8 @@ add_double_gst_tag (GHashTable *metadata,
}
}
+#endif /* ENABLE_DETAILED_METADATA */
+
static void
add_fraction_gst_tag (GHashTable *metadata,
const gchar *key,
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index ba88064..ae7921c 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -93,10 +93,14 @@ typedef struct {
} TagType;
static gchar *date_to_iso8601 (const gchar *exif_date);
+
+#ifdef ENABLE_DETAILED_METADATA
static gchar *fix_focal_length (const gchar *fl);
-static gchar *fix_flash (const gchar *flash);
static gchar *fix_fnumber (const gchar *fn);
static gchar *fix_exposure_time (const gchar *et);
+#endif /* ENABLE_DETAILED_METADATA */
+
+static gchar *fix_flash (const gchar *flash);
static gchar *fix_orientation (const gchar *orientation);
static TagType tags[] = {
@@ -195,12 +199,16 @@ date_to_iso8601 (const gchar *date)
return tracker_date_format_to_iso8601 (date, EXIF_DATE_FORMAT);
}
+#ifdef ENABLE_DETAILED_METADATA
+
static gchar *
fix_focal_length (const gchar *fl)
{
return g_strndup (fl, strstr (fl, " mm") - fl);
}
+#endif /* ENABLE_DETAILED_METADATA */
+
static gchar *
fix_flash (const gchar *flash)
{
@@ -211,6 +219,8 @@ fix_flash (const gchar *flash)
}
}
+#ifdef ENABLE_DETAILED_METADATA
+
static gchar *
fix_fnumber (const gchar *fn)
{
@@ -257,6 +267,8 @@ fix_exposure_time (const gchar *et)
return g_strdup (et);
}
+#endif /* ENABLE_DETAILED_METADATA */
+
static gchar *
fix_orientation (const gchar *orientation)
{
diff --git a/src/tracker-extract/tracker-xmp.c b/src/tracker-extract/tracker-xmp.c
index da14a65..85af36c 100644
--- a/src/tracker-extract/tracker-xmp.c
+++ b/src/tracker-extract/tracker-xmp.c
@@ -35,6 +35,8 @@
#include <exempi/xmp.h>
#include <exempi/xmpconsts.h>
+#ifdef ENABLE_DETAILED_METADATA
+
static gchar *
fix_metering_mode (const gchar *mode)
{
@@ -61,6 +63,8 @@ fix_metering_mode (const gchar *mode)
return "unknown";
}
+#endif /* ENABLE_DETAILED_METADATA */
+
static gchar *
fix_flash (const gchar *flash)
{
@@ -76,6 +80,8 @@ fix_flash (const gchar *flash)
}
}
+#ifdef ENABLE_DETAILED_METADATA
+
static gchar *
fix_white_balance (const gchar *wb)
{
@@ -86,6 +92,8 @@ fix_white_balance (const gchar *wb)
}
}
+#endif /* ENABLE_DETAILED_METADATA */
+
static void tracker_xmp_iter (XmpPtr xmp,
XmpIteratorPtr iter,
GHashTable *metadata,
diff --git a/tests/tracker-extract/tracker-extract-test-utils.c b/tests/tracker-extract/tracker-extract-test-utils.c
index ba3cdd5..7e6609b 100644
--- a/tests/tracker-extract/tracker-extract-test-utils.c
+++ b/tests/tracker-extract/tracker-extract-test-utils.c
@@ -176,7 +176,7 @@ tracker_test_extract_get_extract (const gchar *path, const gchar *mime)
data = (func) ();
} else {
g_error ("Could not get accesspoint to the module");
- return;
+ return NULL;
}
/* Search for exact match first */
diff --git a/tests/tracker-indexer/tracker-metadata-utils-test.c b/tests/tracker-indexer/tracker-metadata-utils-test.c
index e063649..d7ff925 100644
--- a/tests/tracker-indexer/tracker-metadata-utils-test.c
+++ b/tests/tracker-indexer/tracker-metadata-utils-test.c
@@ -17,12 +17,14 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <glib.h>
+
+#include <glib-object.h>
#include <tracker-test-helpers.h>
-void
-test_something () {
+static void
+test_something (void)
+{
g_assert_cmpint (1, ==, 1);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]