tracker-0.16.2/src/tracker-store/tracker-backup.c

Location Tool Test ID Function Issue
tracker-backup.c:322:25 gcc unused-but-set-variable tracker_backup_save_finish variable '_data_' set but not used
tracker-backup.c:330:2 clang-analyzer Value stored to '_data_' is never read
tracker-backup.c:377:19 gcc unused-but-set-variable block2_data_unref variable 'self' set but not used
tracker-backup.c:379:3 clang-analyzer Value stored to 'self' is never read
tracker-backup.c:416:18 gcc unused-but-set-variable ___lambda8_ variable 'self' set but not used
tracker-backup.c:422:2 clang-analyzer Value stored to 'self' is never read
tracker-backup.c:775:28 gcc unused-but-set-variable tracker_backup_restore_finish variable '_data_' set but not used
tracker-backup.c:783:2 clang-analyzer Value stored to '_data_' is never read
tracker-backup.c:1197:11 gcc unused-but-set-variable tracker_backup_dbus_interface_get_property variable 'object' set but not used
tracker-backup.c:1199:2 clang-analyzer Value stored to 'object' is never read
tracker-backup.c:1206:11 gcc unused-but-set-variable tracker_backup_dbus_interface_set_property variable 'object' set but not used
tracker-backup.c:1208:2 clang-analyzer Value stored to 'object' is never read
   1 /* tracker-backup.c generated by valac 0.18.1, the Vala compiler
   2  * generated from tracker-backup.vala, do not modify */
   3 
   4 /*
   5  * Copyright (C) 2006, Jamie McCracken <jamiemcc@gnome.org>
   6  * Copyright (C) 2008-2011, Nokia <ivan.frade@nokia.com>
   7  *
   8  * This library is free software; you can redistribute it and/or
   9  * modify it under the terms of the GNU General Public
  10  * License as published by the Free Software Foundation; either
  11  * version 2 of the License, or (at your option) any later version.
  12  *
  13  * This library is distributed in the hope that it will be useful,
  14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16  * General Public License for more details.
  17  *
  18  * You should have received a copy of the GNU General Public
  19  * License along with this library; if not, write to the
  20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21  * Boston, MA  02110-1301, USA.
  22  */
  23 
  24 #include <glib.h>
  25 #include <glib-object.h>
  26 #include <gio/gio.h>
  27 #include <stdlib.h>
  28 #include <string.h>
  29 #include "tracker-store/tracker-events.h"
  30 #include "libtracker-common/tracker-common.h"
  31 #include "libtracker-data/tracker-data-backup.h"
  32 #include "libtracker-data/tracker-data-query.h"
  33 #include "libtracker-data/tracker-data-update.h"
  34 
  35 
  36 #define TRACKER_TYPE_BACKUP (tracker_backup_get_type ())
  37 #define TRACKER_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_BACKUP, TrackerBackup))
  38 #define TRACKER_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_BACKUP, TrackerBackupClass))
  39 #define TRACKER_IS_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_BACKUP))
  40 #define TRACKER_IS_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_BACKUP))
  41 #define TRACKER_BACKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_BACKUP, TrackerBackupClass))
  42 
  43 typedef struct _TrackerBackup TrackerBackup;
  44 typedef struct _TrackerBackupClass TrackerBackupClass;
  45 typedef struct _TrackerBackupPrivate TrackerBackupPrivate;
  46 #define _g_free0(var) (var = (g_free (var), NULL))
  47 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  48 typedef struct _Block1Data Block1Data;
  49 
  50 #define TRACKER_TYPE_RESOURCES (tracker_resources_get_type ())
  51 #define TRACKER_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_RESOURCES, TrackerResources))
  52 #define TRACKER_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
  53 #define TRACKER_IS_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_RESOURCES))
  54 #define TRACKER_IS_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_RESOURCES))
  55 #define TRACKER_RESOURCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
  56 
  57 typedef struct _TrackerResources TrackerResources;
  58 typedef struct _TrackerResourcesClass TrackerResourcesClass;
  59 typedef struct _Block2Data Block2Data;
  60 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  61 typedef struct _TrackerBackupSaveData TrackerBackupSaveData;
  62 
  63 #define TRACKER_TYPE_STATUS (tracker_status_get_type ())
  64 #define TRACKER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_STATUS, TrackerStatus))
  65 #define TRACKER_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_STATUS, TrackerStatusClass))
  66 #define TRACKER_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_STATUS))
  67 #define TRACKER_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STATUS))
  68 #define TRACKER_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STATUS, TrackerStatusClass))
  69 
  70 typedef struct _TrackerStatus TrackerStatus;
  71 typedef struct _TrackerStatusClass TrackerStatusClass;
  72 typedef struct _TrackerBackupRestoreData TrackerBackupRestoreData;
  73 
  74 struct _TrackerBackup {
  75 	GObject parent_instance;
  76 	TrackerBackupPrivate * priv;
  77 };
  78 
  79 struct _TrackerBackupClass {
  80 	GObjectClass parent_class;
  81 };
  82 
  83 struct _Block1Data {
  84 	int _ref_count_;
  85 	TrackerBackup * self;
  86 	gpointer _async_data_;
  87 };
  88 
  89 struct _Block2Data {
  90 	int _ref_count_;
  91 	Block1Data * _data1_;
  92 	GError* backup_error;
  93 };
  94 
  95 struct _TrackerBackupSaveData {
  96 	int _state_;
  97 	GObject* _source_object_;
  98 	GAsyncResult* _res_;
  99 	GSimpleAsyncResult* _async_result;
 100 	TrackerBackup* self;
 101 	char* sender;
 102 	gchar* destination_uri;
 103 	Block1Data* _data1_;
 104 	GObject* _tmp0_;
 105 	TrackerResources* resources;
 106 	TrackerResources* _tmp1_;
 107 	TrackerResources* _tmp2_;
 108 	const char* _tmp3_;
 109 	const gchar* _tmp4_;
 110 	TrackerDBusRequest* _tmp5_;
 111 	TrackerDBusRequest* request;
 112 	Block2Data* _data2_;
 113 	const gchar* _tmp6_;
 114 	GFile* _tmp7_;
 115 	GFile* destination;
 116 	gboolean _tmp8_;
 117 	GFile* _tmp9_;
 118 	GFile* _tmp10_;
 119 	gchar* _tmp11_;
 120 	gchar* _tmp12_;
 121 	gboolean _tmp13_;
 122 	const gchar* _tmp14_;
 123 	gchar* _tmp15_;
 124 	gchar* _tmp16_;
 125 	gchar* _tmp17_;
 126 	gchar* _tmp18_;
 127 	GError* _tmp19_;
 128 	GError* _tmp20_;
 129 	GFile* _tmp21_;
 130 	GError* _tmp22_;
 131 	GError* _tmp23_;
 132 	GError* _tmp24_;
 133 	TrackerDBusRequest* _tmp25_;
 134 	GError* e;
 135 	TrackerDBusRequest* _tmp26_;
 136 	GError* _tmp27_;
 137 	GError* _tmp28_;
 138 	GError* _tmp29_;
 139 	TrackerResources* _tmp30_;
 140 	TrackerResources* _tmp31_;
 141 	GError * _inner_error_;
 142 };
 143 
 144 struct _TrackerBackupRestoreData {
 145 	int _state_;
 146 	GObject* _source_object_;
 147 	GAsyncResult* _res_;
 148 	GSimpleAsyncResult* _async_result;
 149 	TrackerBackup* self;
 150 	char* sender;
 151 	gchar* journal_uri;
 152 	GObject* _tmp0_;
 153 	TrackerResources* resources;
 154 	TrackerResources* _tmp1_;
 155 	TrackerResources* _tmp2_;
 156 	const char* _tmp3_;
 157 	const gchar* _tmp4_;
 158 	TrackerDBusRequest* _tmp5_;
 159 	TrackerDBusRequest* request;
 160 	const gchar* _tmp6_;
 161 	GFile* _tmp7_;
 162 	GFile* journal;
 163 	gboolean _tmp8_;
 164 	GFile* _tmp9_;
 165 	GFile* _tmp10_;
 166 	gchar* _tmp11_;
 167 	gchar* _tmp12_;
 168 	gboolean _tmp13_;
 169 	const gchar* _tmp14_;
 170 	gchar* _tmp15_;
 171 	gchar* _tmp16_;
 172 	gchar* _tmp17_;
 173 	gchar* _tmp18_;
 174 	GError* _tmp19_;
 175 	GError* _tmp20_;
 176 	GObject* _tmp21_;
 177 	TrackerStatus* notifier;
 178 	TrackerStatus* _tmp22_;
 179 	void* _tmp23_;
 180 	GDestroyNotify _tmp24_;
 181 	TrackerBusyCallback _tmp25_;
 182 	TrackerBusyCallback busy_callback;
 183 	void* busy_callback_target;
 184 	GDestroyNotify busy_callback_target_destroy_notify;
 185 	GFile* _tmp26_;
 186 	TrackerBusyCallback _tmp27_;
 187 	void* _tmp27__target;
 188 	TrackerDBusRequest* _tmp28_;
 189 	GError* e;
 190 	TrackerDBusRequest* _tmp29_;
 191 	GError* _tmp30_;
 192 	GError* _tmp31_;
 193 	GError* _tmp32_;
 194 	TrackerResources* _tmp33_;
 195 	TrackerResources* _tmp34_;
 196 	GError * _inner_error_;
 197 };
 198 
 199 
 200 static gpointer tracker_backup_parent_class = NULL;
 201 
 202 GType tracker_backup_get_type (void) G_GNUC_CONST;
 203 guint tracker_backup_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 204 enum  {
 205 	TRACKER_BACKUP_DUMMY_PROPERTY
 206 };
 207 #define TRACKER_BACKUP_PATH "/org/freedesktop/Tracker1/Backup"
 208 static void tracker_backup_save_data_free (gpointer _data);
 209 void tracker_backup_save (TrackerBackup* self, const char* sender, const gchar* destination_uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 210 void tracker_backup_save_finish (TrackerBackup* self, GAsyncResult* _res_, GError** error);
 211 static gboolean tracker_backup_save_co (TrackerBackupSaveData* _data_);
 212 static Block1Data* block1_data_ref (Block1Data* _data1_);
 213 static void block1_data_unref (void * _userdata_);
 214 GObject* tracker_dbus_get_object (GType type);
 215 GType tracker_resources_get_type (void) G_GNUC_CONST;
 216 guint tracker_resources_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 217 void tracker_resources_disable_signals (TrackerResources* self);
 218 static Block2Data* block2_data_ref (Block2Data* _data2_);
 219 static void block2_data_unref (void * _userdata_);
 220 void tracker_store_pause (GAsyncReadyCallback _callback_, gpointer _user_data_);
 221 void tracker_store_pause_finish (GAsyncResult* _res_);
 222 static void tracker_backup_save_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 223 static void ___lambda8_ (Block2Data* _data2_, GError* _error_);
 224 static void ____lambda8__tracker_data_backup_finished (GError* _error_, gpointer self);
 225 void tracker_resources_enable_signals (TrackerResources* self);
 226 void tracker_store_resume (void);
 227 static void tracker_backup_restore_data_free (gpointer _data);
 228 void tracker_backup_restore (TrackerBackup* self, const char* sender, const gchar* journal_uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 229 void tracker_backup_restore_finish (TrackerBackup* self, GAsyncResult* _res_, GError** error);
 230 static gboolean tracker_backup_restore_co (TrackerBackupRestoreData* _data_);
 231 static void tracker_backup_restore_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 232 GType tracker_status_get_type (void) G_GNUC_CONST;
 233 guint tracker_status_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 234 TrackerBusyCallback tracker_status_get_callback (TrackerStatus* self, void** result_target, GDestroyNotify* result_target_destroy_notify);
 235 TrackerBackup* tracker_backup_new (void);
 236 TrackerBackup* tracker_backup_construct (GType object_type);
 237 static void _dbus_tracker_backup_save (TrackerBackup* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 238 static void _dbus_tracker_backup_save_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 239 static void _dbus_tracker_backup_restore (TrackerBackup* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 240 static void _dbus_tracker_backup_restore_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 241 static void tracker_backup_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
 242 static GVariant* tracker_backup_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
 243 static gboolean tracker_backup_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
 244 static void _tracker_backup_unregister_object (gpointer user_data);
 245 
 246 static const GDBusArgInfo _tracker_backup_dbus_arg_info_save_destination_uri = {-1, "destination_uri", "s"};
 247 static const GDBusArgInfo * const _tracker_backup_dbus_arg_info_save_in[] = {&_tracker_backup_dbus_arg_info_save_destination_uri, NULL};
 248 static const GDBusArgInfo * const _tracker_backup_dbus_arg_info_save_out[] = {NULL};
 249 static const GDBusMethodInfo _tracker_backup_dbus_method_info_save = {-1, "Save", (GDBusArgInfo **) (&_tracker_backup_dbus_arg_info_save_in), (GDBusArgInfo **) (&_tracker_backup_dbus_arg_info_save_out)};
 250 static const GDBusArgInfo _tracker_backup_dbus_arg_info_restore_journal_uri = {-1, "journal_uri", "s"};
 251 static const GDBusArgInfo * const _tracker_backup_dbus_arg_info_restore_in[] = {&_tracker_backup_dbus_arg_info_restore_journal_uri, NULL};
 252 static const GDBusArgInfo * const _tracker_backup_dbus_arg_info_restore_out[] = {NULL};
 253 static const GDBusMethodInfo _tracker_backup_dbus_method_info_restore = {-1, "Restore", (GDBusArgInfo **) (&_tracker_backup_dbus_arg_info_restore_in), (GDBusArgInfo **) (&_tracker_backup_dbus_arg_info_restore_out)};
 254 static const GDBusMethodInfo * const _tracker_backup_dbus_method_info[] = {&_tracker_backup_dbus_method_info_save, &_tracker_backup_dbus_method_info_restore, NULL};
 255 static const GDBusSignalInfo * const _tracker_backup_dbus_signal_info[] = {NULL};
 256 static const GDBusPropertyInfo * const _tracker_backup_dbus_property_info[] = {NULL};
 257 static const GDBusInterfaceInfo _tracker_backup_dbus_interface_info = {-1, "org.freedesktop.Tracker1.Backup", (GDBusMethodInfo **) (&_tracker_backup_dbus_method_info), (GDBusSignalInfo **) (&_tracker_backup_dbus_signal_info), (GDBusPropertyInfo **) (&_tracker_backup_dbus_property_info)};
 258 static const GDBusInterfaceVTable _tracker_backup_dbus_interface_vtable = {tracker_backup_dbus_interface_method_call, tracker_backup_dbus_interface_get_property, tracker_backup_dbus_interface_set_property};
 259 
 260 static void tracker_backup_save_data_free (gpointer _data) {
 261 	TrackerBackupSaveData* _data_;
 262 	_data_ = _data;
 263 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 264 	_g_free0 (_data_->sender);
 265 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 266 	_g_free0 (_data_->destination_uri);
 267 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 268 	_g_object_unref0 (_data_->self);
 269 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 270 	g_slice_free (TrackerBackupSaveData, _data_);
 271 #line 272 "tracker-backup.c"
 272 }
 273 
 274 
 275 static gpointer _g_object_ref0 (gpointer self) {
 276 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 277 	return self ? g_object_ref (self) : NULL;
 278 #line 279 "tracker-backup.c"
 279 }
 280 
 281 
 282 void tracker_backup_save (TrackerBackup* self, const char* sender, const gchar* destination_uri, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 283 	TrackerBackupSaveData* _data_;
 284 	TrackerBackup* _tmp0_;
 285 	const char* _tmp1_;
 286 	char* _tmp2_;
 287 	const gchar* _tmp3_;
 288 	gchar* _tmp4_;
 289 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 290 	_data_ = g_slice_new0 (TrackerBackupSaveData);
 291 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 292 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_backup_save);
 293 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 294 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_backup_save_data_free);
 295 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 296 	_tmp0_ = _g_object_ref0 (self);
 297 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 298 	_data_->self = _tmp0_;
 299 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 300 	_tmp1_ = sender;
 301 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 302 	_tmp2_ = g_strdup (_tmp1_);
 303 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 304 	_g_free0 (_data_->sender);
 305 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 306 	_data_->sender = _tmp2_;
 307 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 308 	_tmp3_ = destination_uri;
 309 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 310 	_tmp4_ = g_strdup (_tmp3_);
 311 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 312 	_g_free0 (_data_->destination_uri);
 313 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 314 	_data_->destination_uri = _tmp4_;
 315 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala"
 316 	tracker_backup_save_co (_data_);
 317 #line 318 "tracker-backup.c"
 318 }
 319 
 320 
 321 void tracker_backup_save_finish (TrackerBackup* self, GAsyncResult* _res_, GError** error) {
 322 	TrackerBackupSaveData* _data_;
variable '_data_' set but not used
(emitted by gcc)
323 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 324 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 325 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 326 return; 327 #line 328 "tracker-backup.c" 328 } 329 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 330 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

331 #line 332 "tracker-backup.c" 332 } 333 334 335 static Block1Data* block1_data_ref (Block1Data* _data1_) { 336 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 337 g_atomic_int_inc (&_data1_->_ref_count_); 338 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 339 return _data1_; 340 #line 341 "tracker-backup.c" 341 } 342 343 344 static void block1_data_unref (void * _userdata_) { 345 Block1Data* _data1_; 346 _data1_ = (Block1Data*) _userdata_; 347 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 348 if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { 349 #line 350 "tracker-backup.c" 350 TrackerBackup * self; 351 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 352 self = _data1_->self; 353 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 354 _g_object_unref0 (self); 355 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 356 g_slice_free (Block1Data, _data1_); 357 #line 358 "tracker-backup.c" 358 } 359 } 360 361 362 static Block2Data* block2_data_ref (Block2Data* _data2_) { 363 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 364 g_atomic_int_inc (&_data2_->_ref_count_); 365 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 366 return _data2_; 367 #line 368 "tracker-backup.c" 368 } 369 370 371 static void block2_data_unref (void * _userdata_) { 372 Block2Data* _data2_; 373 _data2_ = (Block2Data*) _userdata_; 374 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 375 if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { 376 #line 377 "tracker-backup.c" 377 TrackerBackup * self;
variable 'self' set but not used
(emitted by gcc)
378 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 379 self = _data2_->_data1_->self;
Value stored to 'self' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

380 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 381 _g_error_free0 (_data2_->backup_error); 382 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 383 block1_data_unref (_data2_->_data1_); 384 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 385 _data2_->_data1_ = NULL; 386 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 387 g_slice_free (Block2Data, _data2_); 388 #line 389 "tracker-backup.c" 389 } 390 } 391 392 393 static void tracker_backup_save_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 394 TrackerBackupSaveData* _data_; 395 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 396 _data_ = _user_data_; 397 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 398 _data_->_source_object_ = source_object; 399 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 400 _data_->_res_ = _res_; 401 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 402 tracker_backup_save_co (_data_); 403 #line 404 "tracker-backup.c" 404 } 405 406 407 static gpointer _g_error_copy0 (gpointer self) { 408 #line 44 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 409 return self ? g_error_copy (self) : NULL; 410 #line 411 "tracker-backup.c" 411 } 412 413 414 static void ___lambda8_ (Block2Data* _data2_, GError* _error_) { 415 Block1Data* _data1_; 416 TrackerBackup * self;
variable 'self' set but not used
(emitted by gcc)
417 GError* _tmp0_; 418 GError* _tmp1_; 419 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 420 _data1_ = _data2_->_data1_; 421 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 422 self = _data1_->self;
Value stored to 'self' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

423 #line 44 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 424 _tmp0_ = _error_; 425 #line 44 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 426 _tmp1_ = _g_error_copy0 (_tmp0_); 427 #line 44 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 428 _g_error_free0 (_data2_->backup_error); 429 #line 44 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 430 _data2_->backup_error = _tmp1_; 431 #line 45 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 432 tracker_backup_save_co (_data1_->_async_data_); 433 #line 434 "tracker-backup.c" 434 } 435 436 437 static void ____lambda8__tracker_data_backup_finished (GError* _error_, gpointer self) { 438 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 439 ___lambda8_ (self, _error_); 440 #line 441 "tracker-backup.c" 441 } 442 443 444 static gboolean tracker_backup_save_co (TrackerBackupSaveData* _data_) { 445 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 446 switch (_data_->_state_) { 447 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 448 case 0: 449 #line 450 "tracker-backup.c" 450 goto _state_0; 451 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 452 case 1: 453 #line 454 "tracker-backup.c" 454 goto _state_1; 455 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 456 case 2: 457 #line 458 "tracker-backup.c" 458 goto _state_2; 459 default: 460 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 461 g_assert_not_reached (); 462 #line 463 "tracker-backup.c" 463 } 464 _state_0: 465 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 466 _data_->_data1_ = g_slice_new0 (Block1Data); 467 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 468 _data_->_data1_->_ref_count_ = 1; 469 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 470 _data_->_data1_->self = g_object_ref (_data_->self); 471 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 472 _data_->_data1_->_async_data_ = _data_; 473 #line 26 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 474 _data_->_tmp0_ = NULL; 475 #line 26 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 476 _data_->_tmp0_ = tracker_dbus_get_object (TRACKER_TYPE_RESOURCES); 477 #line 26 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 478 _data_->resources = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRACKER_TYPE_RESOURCES, TrackerResources); 479 #line 27 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 480 _data_->_tmp1_ = _data_->resources; 481 #line 27 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 482 if (_data_->_tmp1_ != NULL) { 483 #line 28 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 484 _data_->_tmp2_ = _data_->resources; 485 #line 28 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 486 tracker_resources_disable_signals (_data_->_tmp2_); 487 #line 29 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 488 tracker_events_shutdown (); 489 #line 490 "tracker-backup.c" 490 } 491 #line 32 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 492 _data_->_tmp3_ = _data_->sender; 493 #line 32 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 494 _data_->_tmp4_ = _data_->destination_uri; 495 #line 32 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 496 _data_->_tmp5_ = NULL; 497 #line 32 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 498 _data_->_tmp5_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp3_, "D-Bus request to save backup into '%s'", _data_->_tmp4_, NULL); 499 #line 32 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 500 _data_->request = _data_->_tmp5_; 501 #line 502 "tracker-backup.c" 502 { 503 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 504 _data_->_data2_ = g_slice_new0 (Block2Data); 505 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 506 _data_->_data2_->_ref_count_ = 1; 507 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 508 _data_->_data2_->_data1_ = block1_data_ref (_data_->_data1_); 509 #line 34 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 510 _data_->_tmp6_ = _data_->destination_uri; 511 #line 34 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 512 _data_->_tmp7_ = NULL; 513 #line 34 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 514 _data_->_tmp7_ = g_file_new_for_uri (_data_->_tmp6_); 515 #line 34 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 516 _data_->destination = _data_->_tmp7_; 517 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 518 _data_->_tmp9_ = _data_->destination; 519 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 520 if (_data_->_tmp9_ == NULL) { 521 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 522 _data_->_tmp8_ = TRUE; 523 #line 524 "tracker-backup.c" 524 } else { 525 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 526 _data_->_tmp10_ = _data_->destination; 527 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 528 _data_->_tmp11_ = NULL; 529 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 530 _data_->_tmp11_ = g_file_get_path (_data_->_tmp10_); 531 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 532 _data_->_tmp12_ = _data_->_tmp11_; 533 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 534 _data_->_tmp8_ = _data_->_tmp12_ == NULL; 535 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 536 _g_free0 (_data_->_tmp12_); 537 #line 538 "tracker-backup.c" 538 } 539 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 540 _data_->_tmp13_ = _data_->_tmp8_; 541 #line 36 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 542 if (_data_->_tmp13_) { 543 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 544 _data_->_tmp14_ = _data_->destination_uri; 545 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 546 _data_->_tmp15_ = g_strconcat ("'", _data_->_tmp14_, NULL); 547 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 548 _data_->_tmp16_ = _data_->_tmp15_; 549 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 550 _data_->_tmp17_ = g_strconcat (_data_->_tmp16_, "' is not a valid uri", NULL); 551 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 552 _data_->_tmp18_ = _data_->_tmp17_; 553 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 554 _data_->_tmp19_ = g_error_new_literal (TRACKER_DATA_BACKUP_ERROR, TRACKER_DATA_BACKUP_ERROR_INVALID_URI, _data_->_tmp18_); 555 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 556 _data_->_tmp20_ = _data_->_tmp19_; 557 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 558 _g_free0 (_data_->_tmp18_); 559 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 560 _g_free0 (_data_->_tmp16_); 561 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 562 _data_->_inner_error_ = _data_->_tmp20_; 563 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 564 _g_object_unref0 (_data_->destination); 565 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 566 block2_data_unref (_data_->_data2_); 567 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 568 _data_->_data2_ = NULL; 569 #line 570 "tracker-backup.c" 570 goto __catch0_g_error; 571 } 572 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 573 _data_->_state_ = 1; 574 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 575 tracker_store_pause (tracker_backup_save_ready, _data_); 576 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 577 return FALSE; 578 #line 579 "tracker-backup.c" 579 _state_1: 580 #line 40 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 581 tracker_store_pause_finish (_data_->_res_); 582 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 583 _data_->_data2_->backup_error = NULL; 584 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 585 _data_->_tmp21_ = _data_->destination; 586 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 587 tracker_data_backup_save (_data_->_tmp21_, ____lambda8__tracker_data_backup_finished, block2_data_ref (_data_->_data2_), block2_data_unref); 588 #line 47 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 589 _data_->_state_ = 2; 590 #line 47 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 591 return FALSE; 592 #line 593 "tracker-backup.c" 593 _state_2: 594 ; 595 #line 49 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 596 _data_->_tmp22_ = _data_->_data2_->backup_error; 597 #line 49 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 598 if (_data_->_tmp22_ != NULL) { 599 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 600 _data_->_tmp23_ = _data_->_data2_->backup_error; 601 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 602 _data_->_tmp24_ = _g_error_copy0 (_data_->_tmp23_); 603 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 604 _data_->_inner_error_ = _data_->_tmp24_; 605 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 606 _g_object_unref0 (_data_->destination); 607 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 608 block2_data_unref (_data_->_data2_); 609 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 610 _data_->_data2_ = NULL; 611 #line 612 "tracker-backup.c" 612 goto __catch0_g_error; 613 } 614 #line 53 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 615 _data_->_tmp25_ = _data_->request; 616 #line 53 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 617 tracker_dbus_request_end (_data_->_tmp25_, NULL); 618 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 619 _g_object_unref0 (_data_->destination); 620 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 621 block2_data_unref (_data_->_data2_); 622 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 623 _data_->_data2_ = NULL; 624 #line 625 "tracker-backup.c" 625 } 626 goto __finally0; 627 __catch0_g_error: 628 { 629 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 630 _data_->e = _data_->_inner_error_; 631 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 632 _data_->_inner_error_ = NULL; 633 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 634 _data_->_tmp26_ = _data_->request; 635 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 636 _data_->_tmp27_ = _data_->e; 637 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 638 tracker_dbus_request_end (_data_->_tmp26_, _data_->_tmp27_); 639 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 640 _data_->_tmp28_ = _data_->e; 641 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 642 _data_->_tmp29_ = _g_error_copy0 (_data_->_tmp28_); 643 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 644 _data_->_inner_error_ = _data_->_tmp29_; 645 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 646 _g_error_free0 (_data_->e); 647 #line 648 "tracker-backup.c" 648 goto __finally0; 649 } 650 __finally0: 651 { 652 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 653 _data_->_tmp30_ = _data_->resources; 654 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 655 if (_data_->_tmp30_ != NULL) { 656 #line 59 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 657 tracker_events_init (); 658 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 659 _data_->_tmp31_ = _data_->resources; 660 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 661 tracker_resources_enable_signals (_data_->_tmp31_); 662 #line 663 "tracker-backup.c" 663 } 664 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 665 tracker_store_resume (); 666 #line 667 "tracker-backup.c" 667 } 668 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 669 if (_data_->_inner_error_ != NULL) { 670 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 671 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 672 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 673 g_error_free (_data_->_inner_error_); 674 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 675 _g_object_unref0 (_data_->resources); 676 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 677 block1_data_unref (_data_->_data1_); 678 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 679 _data_->_data1_ = NULL; 680 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 681 if (_data_->_state_ == 0) { 682 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 683 g_simple_async_result_complete_in_idle (_data_->_async_result); 684 #line 685 "tracker-backup.c" 685 } else { 686 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 687 g_simple_async_result_complete (_data_->_async_result); 688 #line 689 "tracker-backup.c" 689 } 690 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 691 g_object_unref (_data_->_async_result); 692 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 693 return FALSE; 694 #line 695 "tracker-backup.c" 695 } 696 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 697 _g_object_unref0 (_data_->resources); 698 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 699 block1_data_unref (_data_->_data1_); 700 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 701 _data_->_data1_ = NULL; 702 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 703 if (_data_->_state_ == 0) { 704 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 705 g_simple_async_result_complete_in_idle (_data_->_async_result); 706 #line 707 "tracker-backup.c" 707 } else { 708 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 709 g_simple_async_result_complete (_data_->_async_result); 710 #line 711 "tracker-backup.c" 711 } 712 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 713 g_object_unref (_data_->_async_result); 714 #line 25 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 715 return FALSE; 716 #line 717 "tracker-backup.c" 717 } 718 719 720 static void tracker_backup_restore_data_free (gpointer _data) { 721 TrackerBackupRestoreData* _data_; 722 _data_ = _data; 723 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 724 _g_free0 (_data_->sender); 725 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 726 _g_free0 (_data_->journal_uri); 727 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 728 _g_object_unref0 (_data_->self); 729 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 730 g_slice_free (TrackerBackupRestoreData, _data_); 731 #line 732 "tracker-backup.c" 732 } 733 734 735 void tracker_backup_restore (TrackerBackup* self, const char* sender, const gchar* journal_uri, GAsyncReadyCallback _callback_, gpointer _user_data_) { 736 TrackerBackupRestoreData* _data_; 737 TrackerBackup* _tmp0_; 738 const char* _tmp1_; 739 char* _tmp2_; 740 const gchar* _tmp3_; 741 gchar* _tmp4_; 742 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 743 _data_ = g_slice_new0 (TrackerBackupRestoreData); 744 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 745 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_backup_restore); 746 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 747 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_backup_restore_data_free); 748 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 749 _tmp0_ = _g_object_ref0 (self); 750 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 751 _data_->self = _tmp0_; 752 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 753 _tmp1_ = sender; 754 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 755 _tmp2_ = g_strdup (_tmp1_); 756 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 757 _g_free0 (_data_->sender); 758 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 759 _data_->sender = _tmp2_; 760 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 761 _tmp3_ = journal_uri; 762 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 763 _tmp4_ = g_strdup (_tmp3_); 764 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 765 _g_free0 (_data_->journal_uri); 766 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 767 _data_->journal_uri = _tmp4_; 768 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 769 tracker_backup_restore_co (_data_); 770 #line 771 "tracker-backup.c" 771 } 772 773 774 void tracker_backup_restore_finish (TrackerBackup* self, GAsyncResult* _res_, GError** error) { 775 TrackerBackupRestoreData* _data_;
variable '_data_' set but not used
(emitted by gcc)
776 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 777 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 778 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 779 return; 780 #line 781 "tracker-backup.c" 781 } 782 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 783 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

784 #line 785 "tracker-backup.c" 785 } 786 787 788 static void tracker_backup_restore_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 789 TrackerBackupRestoreData* _data_; 790 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 791 _data_ = _user_data_; 792 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 793 _data_->_source_object_ = source_object; 794 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 795 _data_->_res_ = _res_; 796 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 797 tracker_backup_restore_co (_data_); 798 #line 799 "tracker-backup.c" 799 } 800 801 802 static gboolean tracker_backup_restore_co (TrackerBackupRestoreData* _data_) { 803 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 804 switch (_data_->_state_) { 805 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 806 case 0: 807 #line 808 "tracker-backup.c" 808 goto _state_0; 809 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 810 case 1: 811 #line 812 "tracker-backup.c" 812 goto _state_1; 813 default: 814 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 815 g_assert_not_reached (); 816 #line 817 "tracker-backup.c" 817 } 818 _state_0: 819 #line 68 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 820 _data_->_tmp0_ = NULL; 821 #line 68 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 822 _data_->_tmp0_ = tracker_dbus_get_object (TRACKER_TYPE_RESOURCES); 823 #line 68 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 824 _data_->resources = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRACKER_TYPE_RESOURCES, TrackerResources); 825 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 826 _data_->_tmp1_ = _data_->resources; 827 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 828 if (_data_->_tmp1_ != NULL) { 829 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 830 _data_->_tmp2_ = _data_->resources; 831 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 832 tracker_resources_disable_signals (_data_->_tmp2_); 833 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 834 tracker_events_shutdown (); 835 #line 836 "tracker-backup.c" 836 } 837 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 838 _data_->_tmp3_ = _data_->sender; 839 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 840 _data_->_tmp4_ = _data_->journal_uri; 841 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 842 _data_->_tmp5_ = NULL; 843 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 844 _data_->_tmp5_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp3_, "D-Bus request to restore backup from '%s'", _data_->_tmp4_, NULL); 845 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 846 _data_->request = _data_->_tmp5_; 847 #line 848 "tracker-backup.c" 848 { 849 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 850 _data_->_state_ = 1; 851 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 852 tracker_store_pause (tracker_backup_restore_ready, _data_); 853 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 854 return FALSE; 855 #line 856 "tracker-backup.c" 856 _state_1: 857 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 858 tracker_store_pause_finish (_data_->_res_); 859 #line 78 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 860 _data_->_tmp6_ = _data_->journal_uri; 861 #line 78 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 862 _data_->_tmp7_ = NULL; 863 #line 78 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 864 _data_->_tmp7_ = g_file_new_for_uri (_data_->_tmp6_); 865 #line 78 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 866 _data_->journal = _data_->_tmp7_; 867 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 868 _data_->_tmp9_ = _data_->journal; 869 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 870 if (_data_->_tmp9_ == NULL) { 871 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 872 _data_->_tmp8_ = TRUE; 873 #line 874 "tracker-backup.c" 874 } else { 875 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 876 _data_->_tmp10_ = _data_->journal; 877 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 878 _data_->_tmp11_ = NULL; 879 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 880 _data_->_tmp11_ = g_file_get_path (_data_->_tmp10_); 881 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 882 _data_->_tmp12_ = _data_->_tmp11_; 883 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 884 _data_->_tmp8_ = _data_->_tmp12_ == NULL; 885 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 886 _g_free0 (_data_->_tmp12_); 887 #line 888 "tracker-backup.c" 888 } 889 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 890 _data_->_tmp13_ = _data_->_tmp8_; 891 #line 80 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 892 if (_data_->_tmp13_) { 893 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 894 _data_->_tmp14_ = _data_->journal_uri; 895 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 896 _data_->_tmp15_ = g_strconcat ("'", _data_->_tmp14_, NULL); 897 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 898 _data_->_tmp16_ = _data_->_tmp15_; 899 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 900 _data_->_tmp17_ = g_strconcat (_data_->_tmp16_, "' is not a valid uri", NULL); 901 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 902 _data_->_tmp18_ = _data_->_tmp17_; 903 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 904 _data_->_tmp19_ = g_error_new_literal (TRACKER_DATA_BACKUP_ERROR, TRACKER_DATA_BACKUP_ERROR_INVALID_URI, _data_->_tmp18_); 905 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 906 _data_->_tmp20_ = _data_->_tmp19_; 907 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 908 _g_free0 (_data_->_tmp18_); 909 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 910 _g_free0 (_data_->_tmp16_); 911 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 912 _data_->_inner_error_ = _data_->_tmp20_; 913 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 914 _g_object_unref0 (_data_->journal); 915 #line 916 "tracker-backup.c" 916 goto __catch1_g_error; 917 } 918 #line 84 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 919 _data_->_tmp21_ = NULL; 920 #line 84 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 921 _data_->_tmp21_ = tracker_dbus_get_object (TRACKER_TYPE_STATUS); 922 #line 84 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 923 _data_->notifier = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp21_, TRACKER_TYPE_STATUS, TrackerStatus); 924 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 925 _data_->_tmp22_ = _data_->notifier; 926 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 927 _data_->_tmp23_ = NULL; 928 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 929 _data_->_tmp24_ = NULL; 930 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 931 _data_->_tmp25_ = NULL; 932 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 933 _data_->_tmp25_ = tracker_status_get_callback (_data_->_tmp22_, &_data_->_tmp23_, &_data_->_tmp24_); 934 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 935 _data_->busy_callback = _data_->_tmp25_; 936 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 937 _data_->busy_callback_target = _data_->_tmp23_; 938 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 939 _data_->busy_callback_target_destroy_notify = _data_->_tmp24_; 940 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 941 _data_->_tmp26_ = _data_->journal; 942 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 943 _data_->_tmp27_ = _data_->busy_callback; 944 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 945 _data_->_tmp27__target = _data_->busy_callback_target; 946 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 947 tracker_data_backup_restore (_data_->_tmp26_, NULL, _data_->_tmp27_, _data_->_tmp27__target, &_data_->_inner_error_); 948 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 949 if (_data_->_inner_error_ != NULL) { 950 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 951 (_data_->busy_callback_target_destroy_notify == NULL) ? NULL : (_data_->busy_callback_target_destroy_notify (_data_->busy_callback_target), NULL); 952 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 953 _data_->busy_callback = NULL; 954 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 955 _data_->busy_callback_target = NULL; 956 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 957 _data_->busy_callback_target_destroy_notify = NULL; 958 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 959 _g_object_unref0 (_data_->notifier); 960 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 961 _g_object_unref0 (_data_->journal); 962 #line 963 "tracker-backup.c" 963 goto __catch1_g_error; 964 } 965 #line 89 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 966 _data_->_tmp28_ = _data_->request; 967 #line 89 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 968 tracker_dbus_request_end (_data_->_tmp28_, NULL); 969 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 970 (_data_->busy_callback_target_destroy_notify == NULL) ? NULL : (_data_->busy_callback_target_destroy_notify (_data_->busy_callback_target), NULL); 971 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 972 _data_->busy_callback = NULL; 973 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 974 _data_->busy_callback_target = NULL; 975 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 976 _data_->busy_callback_target_destroy_notify = NULL; 977 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 978 _g_object_unref0 (_data_->notifier); 979 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 980 _g_object_unref0 (_data_->journal); 981 #line 982 "tracker-backup.c" 982 } 983 goto __finally1; 984 __catch1_g_error: 985 { 986 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 987 _data_->e = _data_->_inner_error_; 988 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 989 _data_->_inner_error_ = NULL; 990 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 991 _data_->_tmp29_ = _data_->request; 992 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 993 _data_->_tmp30_ = _data_->e; 994 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 995 tracker_dbus_request_end (_data_->_tmp29_, _data_->_tmp30_); 996 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 997 _data_->_tmp31_ = _data_->e; 998 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 999 _data_->_tmp32_ = _g_error_copy0 (_data_->_tmp31_); 1000 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1001 _data_->_inner_error_ = _data_->_tmp32_; 1002 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1003 _g_error_free0 (_data_->e); 1004 #line 1005 "tracker-backup.c" 1005 goto __finally1; 1006 } 1007 __finally1: 1008 { 1009 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1010 _data_->_tmp33_ = _data_->resources; 1011 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1012 if (_data_->_tmp33_ != NULL) { 1013 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1014 tracker_events_init (); 1015 #line 96 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1016 _data_->_tmp34_ = _data_->resources; 1017 #line 96 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1018 tracker_resources_enable_signals (_data_->_tmp34_); 1019 #line 1020 "tracker-backup.c" 1020 } 1021 #line 99 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1022 tracker_store_resume (); 1023 #line 1024 "tracker-backup.c" 1024 } 1025 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1026 if (_data_->_inner_error_ != NULL) { 1027 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1028 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1029 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1030 g_error_free (_data_->_inner_error_); 1031 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1032 _g_object_unref0 (_data_->resources); 1033 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1034 if (_data_->_state_ == 0) { 1035 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1036 g_simple_async_result_complete_in_idle (_data_->_async_result); 1037 #line 1038 "tracker-backup.c" 1038 } else { 1039 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1040 g_simple_async_result_complete (_data_->_async_result); 1041 #line 1042 "tracker-backup.c" 1042 } 1043 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1044 g_object_unref (_data_->_async_result); 1045 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1046 return FALSE; 1047 #line 1048 "tracker-backup.c" 1048 } 1049 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1050 _g_object_unref0 (_data_->resources); 1051 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1052 if (_data_->_state_ == 0) { 1053 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1054 g_simple_async_result_complete_in_idle (_data_->_async_result); 1055 #line 1056 "tracker-backup.c" 1056 } else { 1057 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1058 g_simple_async_result_complete (_data_->_async_result); 1059 #line 1060 "tracker-backup.c" 1060 } 1061 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1062 g_object_unref (_data_->_async_result); 1063 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1064 return FALSE; 1065 #line 1066 "tracker-backup.c" 1066 } 1067 1068 1069 TrackerBackup* tracker_backup_construct (GType object_type) { 1070 TrackerBackup * self = NULL; 1071 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1072 self = (TrackerBackup*) g_object_new (object_type, NULL); 1073 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1074 return self; 1075 #line 1076 "tracker-backup.c" 1076 } 1077 1078 1079 TrackerBackup* tracker_backup_new (void) { 1080 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1081 return tracker_backup_construct (TRACKER_TYPE_BACKUP); 1082 #line 1083 "tracker-backup.c" 1083 } 1084 1085 1086 static void tracker_backup_class_init (TrackerBackupClass * klass) { 1087 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-backup.vala" 1088 tracker_backup_parent_class = g_type_class_peek_parent (klass); 1089 #line 1090 "tracker-backup.c" 1090 } 1091 1092 1093 static void tracker_backup_instance_init (TrackerBackup * self) { 1094 } 1095 1096 1097 GType tracker_backup_get_type (void) { 1098 static volatile gsize tracker_backup_type_id__volatile = 0; 1099 if (g_once_init_enter (&tracker_backup_type_id__volatile)) { 1100 static const GTypeInfo g_define_type_info = { sizeof (TrackerBackupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_backup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerBackup), 0, (GInstanceInitFunc) tracker_backup_instance_init, NULL }; 1101 GType tracker_backup_type_id; 1102 tracker_backup_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerBackup", &g_define_type_info, 0); 1103 g_type_set_qdata (tracker_backup_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) tracker_backup_register_object); 1104 g_once_init_leave (&tracker_backup_type_id__volatile, tracker_backup_type_id); 1105 } 1106 return tracker_backup_type_id__volatile; 1107 } 1108 1109 1110 static void _dbus_tracker_backup_save (TrackerBackup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 1111 GVariantIter _arguments_iter; 1112 gchar* destination_uri = NULL; 1113 GVariant* _tmp0_; 1114 g_variant_iter_init (&_arguments_iter, parameters); 1115 _tmp0_ = g_variant_iter_next_value (&_arguments_iter); 1116 destination_uri = g_variant_dup_string (_tmp0_, NULL); 1117 g_variant_unref (_tmp0_); 1118 tracker_backup_save (self, g_dbus_method_invocation_get_sender (invocation), destination_uri, (GAsyncReadyCallback) _dbus_tracker_backup_save_ready, invocation); 1119 _g_free0 (destination_uri); 1120 } 1121 1122 1123 static void _dbus_tracker_backup_save_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 1124 GDBusMethodInvocation * invocation; 1125 GError* error = NULL; 1126 GDBusMessage* _reply_message; 1127 GVariant* _reply; 1128 GVariantBuilder _reply_builder; 1129 invocation = _user_data_; 1130 tracker_backup_save_finish ((TrackerBackup*) source_object, _res_, &error); 1131 if (error) { 1132 g_dbus_method_invocation_return_gerror (invocation, error); 1133 return; 1134 } 1135 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 1136 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 1137 _reply = g_variant_builder_end (&_reply_builder); 1138 g_dbus_message_set_body (_reply_message, _reply); 1139 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 1140 g_object_unref (invocation); 1141 g_object_unref (_reply_message); 1142 } 1143 1144 1145 static void _dbus_tracker_backup_restore (TrackerBackup* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 1146 GVariantIter _arguments_iter; 1147 gchar* journal_uri = NULL; 1148 GVariant* _tmp1_; 1149 g_variant_iter_init (&_arguments_iter, parameters); 1150 _tmp1_ = g_variant_iter_next_value (&_arguments_iter); 1151 journal_uri = g_variant_dup_string (_tmp1_, NULL); 1152 g_variant_unref (_tmp1_); 1153 tracker_backup_restore (self, g_dbus_method_invocation_get_sender (invocation), journal_uri, (GAsyncReadyCallback) _dbus_tracker_backup_restore_ready, invocation); 1154 _g_free0 (journal_uri); 1155 } 1156 1157 1158 static void _dbus_tracker_backup_restore_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 1159 GDBusMethodInvocation * invocation; 1160 GError* error = NULL; 1161 GDBusMessage* _reply_message; 1162 GVariant* _reply; 1163 GVariantBuilder _reply_builder; 1164 invocation = _user_data_; 1165 tracker_backup_restore_finish ((TrackerBackup*) source_object, _res_, &error); 1166 if (error) { 1167 g_dbus_method_invocation_return_gerror (invocation, error); 1168 return; 1169 } 1170 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 1171 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 1172 _reply = g_variant_builder_end (&_reply_builder); 1173 g_dbus_message_set_body (_reply_message, _reply); 1174 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 1175 g_object_unref (invocation); 1176 g_object_unref (_reply_message); 1177 } 1178 1179 1180 static void tracker_backup_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { 1181 gpointer* data; 1182 gpointer object; 1183 data = user_data; 1184 object = data[0]; 1185 if (strcmp (method_name, "Save") == 0) { 1186 _dbus_tracker_backup_save (object, parameters, invocation); 1187 } else if (strcmp (method_name, "Restore") == 0) { 1188 _dbus_tracker_backup_restore (object, parameters, invocation); 1189 } else { 1190 g_object_unref (invocation); 1191 } 1192 } 1193 1194 1195 static GVariant* tracker_backup_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { 1196 gpointer* data; 1197 gpointer object;
variable 'object' set but not used
(emitted by gcc)
1198 data = user_data; 1199 object = data[0];
Value stored to 'object' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1200 return NULL; 1201 } 1202 1203 1204 static gboolean tracker_backup_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { 1205 gpointer* data; 1206 gpointer object;
variable 'object' set but not used
(emitted by gcc)
1207 data = user_data; 1208 object = data[0];
Value stored to 'object' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1209 return FALSE; 1210 } 1211 1212 1213 guint tracker_backup_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { 1214 guint result; 1215 gpointer *data; 1216 data = g_new (gpointer, 3); 1217 data[0] = g_object_ref (object); 1218 data[1] = g_object_ref (connection); 1219 data[2] = g_strdup (path); 1220 result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_tracker_backup_dbus_interface_info), &_tracker_backup_dbus_interface_vtable, data, _tracker_backup_unregister_object, error); 1221 if (!result) { 1222 return 0; 1223 } 1224 return result; 1225 } 1226 1227 1228 static void _tracker_backup_unregister_object (gpointer user_data) { 1229 gpointer* data; 1230 data = user_data; 1231 g_object_unref (data[0]); 1232 g_object_unref (data[1]); 1233 g_free (data[2]); 1234 g_free (data); 1235 }