[tracker] libtracker-data: Fix compiler warnings
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Fix compiler warnings
- Date: Sat, 16 Sep 2017 19:52:08 +0000 (UTC)
commit dd44a06919d4f1a55a1da1c05c7f23691d0c62ba
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 31 22:38:27 2017 +0200
libtracker-data: Fix compiler warnings
Several unused variables.
src/libtracker-data/tracker-collation.c | 3 +--
src/libtracker-data/tracker-data-backup.c | 1 -
src/libtracker-data/tracker-data-manager.c | 6 +-----
src/libtracker-data/tracker-data-update.c | 2 --
src/libtracker-data/tracker-db-manager.c | 6 ------
5 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/libtracker-data/tracker-collation.c b/src/libtracker-data/tracker-collation.c
index 8bd3e6d..2a48ab2 100644
--- a/src/libtracker-data/tracker-collation.c
+++ b/src/libtracker-data/tracker-collation.c
@@ -245,7 +245,6 @@ static gboolean
skip_non_alphanumeric (const gchar **str,
gint *len)
{
- GUnicodeBreakType break_type;
const gchar *remaining = *str, *end = &remaining[*len];
gboolean found = FALSE, is_alnum;
gunichar unichar;
@@ -336,7 +335,7 @@ tracker_collation_utf8_title (gpointer collator,
title_beginnings = g_strsplit (_(title_beginnings_str), "|", -1);
for (i = 0; title_beginnings[i]; i++) {
- gchar *prefix, *str;
+ gchar *prefix;
gint prefix_len;
prefix = g_utf8_casefold (title_beginnings[i], -1);
diff --git a/src/libtracker-data/tracker-data-backup.c b/src/libtracker-data/tracker-data-backup.c
index 28fd13b..b68ab40 100644
--- a/src/libtracker-data/tracker-data-backup.c
+++ b/src/libtracker-data/tracker-data-backup.c
@@ -422,7 +422,6 @@ tracker_data_backup_save (TrackerDataManager *data_manager,
gchar *path, *directory;
GError *local_error = NULL;
GDir *journal_dir;
- GFile *parent;
GPid pid;
GPtrArray *files;
const gchar *f_name;
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index bfd4727..8563303 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -639,8 +639,6 @@ tracker_data_ontology_load_statement (TrackerDataManager *manager,
GPtrArray *seen_properties,
GError **error)
{
- TrackerOntologies *ontologies = manager->ontologies;
-
if (g_strcmp0 (predicate, RDF_TYPE) == 0) {
if (g_strcmp0 (object, RDFS_CLASS) == 0) {
TrackerClass *class;
@@ -3024,7 +3022,6 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
GString *create_sql = NULL;
GString *in_col_sql = NULL;
GString *sel_col_sql = NULL;
- GString *trigger_sql = NULL;
TrackerProperty **properties, *property, **domain_indexes;
GSList *class_properties = NULL, *field_it;
gboolean main_class;
@@ -4008,7 +4005,7 @@ tracker_data_manager_initable_init (GInitable *initable,
{
TrackerDataManager *manager = TRACKER_DATA_MANAGER (initable);
TrackerDBInterface *iface;
- gboolean is_first_time_index, check_ontology, has_graph_table;
+ gboolean is_first_time_index, check_ontology, has_graph_table = FALSE;
TrackerDBCursor *cursor;
TrackerDBStatement *stmt;
GHashTable *ontos_table;
@@ -4294,7 +4291,6 @@ tracker_data_manager_initable_init (GInitable *initable,
if (check_ontology) {
GList *to_reload = NULL;
GList *ontos = NULL;
- guint p;
GPtrArray *seen_classes;
GPtrArray *seen_properties;
GError *n_error = NULL;
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 641724a..4df4de4 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -338,7 +338,6 @@ tracker_data_remove_delete_statement_callback (TrackerData *data,
{
TrackerStatementDelegate *delegate;
guint i;
- gboolean found = FALSE;
if (!data->delete_callbacks) {
return;
@@ -753,7 +752,6 @@ ensure_graph_id (TrackerData *data,
TrackerDBInterface *iface;
TrackerDBStatement *stmt;
GError *error = NULL;
- gboolean resource_create;
gint id;
id = GPOINTER_TO_INT (g_hash_table_lookup (data->update_buffer.resource_cache, uri));
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index bb5c37f..aff39bf 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -479,7 +479,6 @@ static void
db_recreate_all (TrackerDBManager *db_manager,
GError **error)
{
- guint i;
gchar *locale;
GError *internal_error = NULL;
@@ -539,7 +538,6 @@ perform_recreate (TrackerDBManager *db_manager,
GError **error)
{
GError *internal_error = NULL;
- guint i;
if (first_time) {
*first_time = TRUE;
@@ -580,7 +578,6 @@ tracker_db_manager_new (TrackerDBManagerFlags flags,
TrackerDBManager *db_manager;
TrackerDBVersion version;
gboolean need_reindex;
- guint i;
int in_use_file;
gboolean loaded = FALSE;
TrackerDBInterface *resources_iface;
@@ -1049,10 +1046,7 @@ tracker_db_manager_get_db_interface (TrackerDBManager *db_manager)
}
if (!interface) {
- TrackerDBManagerFlags flags;
-
/* Create a new one to satisfy the request */
- flags = tracker_db_manager_get_flags (db_manager, NULL, NULL);
interface = tracker_db_manager_create_db_interface (db_manager,
TRUE, &internal_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]