[tracker] tracker-extract: Avoid unreachable code when not using libstreamanalyzer
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Avoid unreachable code when not using libstreamanalyzer
- Date: Thu, 8 Jul 2010 08:04:42 +0000 (UTC)
commit 4a7b00ed087b0bd60ff361b124788658d03f740f
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Jul 8 10:04:36 2010 +0200
tracker-extract: Avoid unreachable code when not using libstreamanalyzer
src/tracker-extract/tracker-extract.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index f5d87eb..223d18e 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -138,8 +138,8 @@ load_modules (const gchar *force_module,
if (G_UNLIKELY (force_module)) {
if (!g_str_has_suffix (force_module, "." G_MODULE_SUFFIX)) {
- force_module_checked = g_strdup_printf ("%s.%s",
- force_module,
+ force_module_checked = g_strdup_printf ("%s.%s",
+ force_module,
G_MODULE_SUFFIX);
} else {
force_module_checked = g_strdup (force_module);
@@ -215,15 +215,15 @@ load_modules (const gchar *force_module,
}
}
} else {
- g_warning ("Could not load module '%s': Function %s() was not found, is it exported?",
+ g_warning ("Could not load module '%s': Function %s() was not found, is it exported?",
name, EXTRACT_FUNCTION);
}
g_free (module_path);
}
- if (G_UNLIKELY (force_module) &&
- (!*specific_extractors || (*specific_extractors)->len < 1) &&
+ if (G_UNLIKELY (force_module) &&
+ (!*specific_extractors || (*specific_extractors)->len < 1) &&
(!*generic_extractors || (*generic_extractors)->len < 1)) {
g_warning ("Could not force module '%s', it was not found", force_module_checked);
success = FALSE;
@@ -282,7 +282,9 @@ get_file_metadata (TrackerExtract *extract,
TrackerExtractPrivate *priv;
TrackerSparqlBuilder *statements, *preupdate;
gchar *mime_used = NULL;
+#ifdef HAVE_LIBSTREAMANALYZER
gchar *content_type = NULL;
+#endif
priv = TRACKER_EXTRACT_GET_PRIVATE (extract);
@@ -318,11 +320,15 @@ get_file_metadata (TrackerExtract *extract,
/* We know the mime */
mime_used = g_strdup (mime);
g_strstrip (mime_used);
- } else if (content_type && *content_type) {
+ }
+#ifdef HAVE_LIBSTREAMANALYZER
+ else if (content_type && *content_type) {
/* We know the mime from LSA */
mime_used = content_type;
g_strstrip (mime_used);
- } else {
+ }
+#endif /* HAVE_LIBSTREAMANALYZER */
+ else {
GFile *file;
GFileInfo *info;
GError *error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]