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

Location Tool Test ID Function Issue
tracker-statistics.c:149:4 clang-analyzer Value stored to 'cl_collection_length1' is never read
tracker-statistics.c:316:3 clang-analyzer Value stored to 'cl_collection_length1' is never read
tracker-statistics.c:448:22 gcc unused-but-set-variable tracker_statistics_finalize variable 'self' set but not used
tracker-statistics.c:450:2 clang-analyzer Value stored to 'self' is never read
tracker-statistics.c:510:11 gcc unused-but-set-variable tracker_statistics_dbus_interface_get_property variable 'object' set but not used
tracker-statistics.c:512:2 clang-analyzer Value stored to 'object' is never read
tracker-statistics.c:519:11 gcc unused-but-set-variable tracker_statistics_dbus_interface_set_property variable 'object' set but not used
tracker-statistics.c:521:2 clang-analyzer Value stored to 'object' is never read
  1 /* tracker-statistics.c generated by valac 0.18.1, the Vala compiler
  2  * generated from tracker-statistics.vala, do not modify */
  3 
  4 /*
  5  * Copyright (C) 2011, Nokia <ivan.frade@nokia.com>
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU General Public
 18  * License along with this library; if not, write to the
 19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 20  * Boston, MA  02110-1301, USA.
 21  */
 22 
 23 #include <glib.h>
 24 #include <glib-object.h>
 25 #include <gio/gio.h>
 26 #include <stdlib.h>
 27 #include <string.h>
 28 #include "libtracker-common/tracker-common.h"
 29 #include "libtracker-data/tracker-db-manager.h"
 30 #include "libtracker-data/tracker-db-interface.h"
 31 #include "libtracker-data/tracker-ontologies.h"
 32 #include "libtracker-data/tracker-class.h"
 33 #include "libtracker-sparql/tracker-sparql.h"
 34 
 35 
 36 #define TRACKER_TYPE_STATISTICS (tracker_statistics_get_type ())
 37 #define TRACKER_STATISTICS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_STATISTICS, TrackerStatistics))
 38 #define TRACKER_STATISTICS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_STATISTICS, TrackerStatisticsClass))
 39 #define TRACKER_IS_STATISTICS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_STATISTICS))
 40 #define TRACKER_IS_STATISTICS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STATISTICS))
 41 #define TRACKER_STATISTICS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STATISTICS, TrackerStatisticsClass))
 42 
 43 typedef struct _TrackerStatistics TrackerStatistics;
 44 typedef struct _TrackerStatisticsClass TrackerStatisticsClass;
 45 typedef struct _TrackerStatisticsPrivate TrackerStatisticsPrivate;
 46 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
 47 #define _g_free0(var) (var = (g_free (var), NULL))
 48 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
 49 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
 50 
 51 struct _TrackerStatistics {
 52 	GObject parent_instance;
 53 	TrackerStatisticsPrivate * priv;
 54 };
 55 
 56 struct _TrackerStatisticsClass {
 57 	GObjectClass parent_class;
 58 };
 59 
 60 
 61 static gpointer tracker_statistics_parent_class = NULL;
 62 static gboolean tracker_statistics_initialized;
 63 static gboolean tracker_statistics_initialized = FALSE;
 64 
 65 GType tracker_statistics_get_type (void) G_GNUC_CONST;
 66 guint tracker_statistics_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 67 enum  {
 68 	TRACKER_STATISTICS_DUMMY_PROPERTY
 69 };
 70 #define TRACKER_STATISTICS_PATH "/org/freedesktop/Tracker1/Statistics"
 71 GVariant* tracker_statistics_get (TrackerStatistics* self, const char* sender, GError** error);
 72 TrackerStatistics* tracker_statistics_new (void);
 73 TrackerStatistics* tracker_statistics_construct (GType object_type);
 74 static void tracker_statistics_finalize (GObject* obj);
 75 static void _dbus_tracker_statistics_get (TrackerStatistics* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 76 static void tracker_statistics_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);
 77 static GVariant* tracker_statistics_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);
 78 static gboolean tracker_statistics_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);
 79 static void _tracker_statistics_unregister_object (gpointer user_data);
 80 
 81 static const GDBusArgInfo _tracker_statistics_dbus_arg_info_get_result = {-1, "result", "aas"};
 82 static const GDBusArgInfo * const _tracker_statistics_dbus_arg_info_get_in[] = {NULL};
 83 static const GDBusArgInfo * const _tracker_statistics_dbus_arg_info_get_out[] = {&_tracker_statistics_dbus_arg_info_get_result, NULL};
 84 static const GDBusMethodInfo _tracker_statistics_dbus_method_info_get = {-1, "Get", (GDBusArgInfo **) (&_tracker_statistics_dbus_arg_info_get_in), (GDBusArgInfo **) (&_tracker_statistics_dbus_arg_info_get_out)};
 85 static const GDBusMethodInfo * const _tracker_statistics_dbus_method_info[] = {&_tracker_statistics_dbus_method_info_get, NULL};
 86 static const GDBusSignalInfo * const _tracker_statistics_dbus_signal_info[] = {NULL};
 87 static const GDBusPropertyInfo * const _tracker_statistics_dbus_property_info[] = {NULL};
 88 static const GDBusInterfaceInfo _tracker_statistics_dbus_interface_info = {-1, "org.freedesktop.Tracker1.Statistics", (GDBusMethodInfo **) (&_tracker_statistics_dbus_method_info), (GDBusSignalInfo **) (&_tracker_statistics_dbus_signal_info), (GDBusPropertyInfo **) (&_tracker_statistics_dbus_property_info)};
 89 static const GDBusInterfaceVTable _tracker_statistics_dbus_interface_vtable = {tracker_statistics_dbus_interface_method_call, tracker_statistics_dbus_interface_get_property, tracker_statistics_dbus_interface_set_property};
 90 
 91 static gpointer _g_object_ref0 (gpointer self) {
 92 #line 31 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
 93 	return self ? g_object_ref (self) : NULL;
 94 #line 95 "tracker-statistics.c"
 95 }
 96 
 97 
 98 GVariant* tracker_statistics_get (TrackerStatistics* self, const char* sender, GError** error) {
 99 	GVariant* result = NULL;
100 	const char* _tmp0_;
101 	TrackerDBusRequest* _tmp1_ = NULL;
102 	TrackerDBusRequest* request;
103 	gboolean _tmp2_;
104 	GVariantBuilder* _tmp28_;
105 	GVariantBuilder* builder;
106 	gint _tmp29_ = 0;
107 	TrackerClass** _tmp30_ = NULL;
108 	TrackerDBusRequest* _tmp47_;
109 	GVariantBuilder* _tmp48_;
110 	GVariant* _tmp49_ = NULL;
111 	GError * _inner_error_ = NULL;
112 #line 27 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
113 	g_return_val_if_fail (self != NULL, NULL);
114 #line 27 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
115 	g_return_val_if_fail (sender != NULL, NULL);
116 #line 28 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
117 	_tmp0_ = sender;
118 #line 28 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
119 	_tmp1_ = tracker_dbus_request_begin ((const gchar*) _tmp0_, "Statistics.Get", NULL);
120 #line 28 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
121 	request = _tmp1_;
122 #line 30 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
123 	_tmp2_ = tracker_statistics_initialized;
124 #line 30 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
125 	if (!_tmp2_) {
126 #line 127 "tracker-statistics.c"
127 		TrackerDBInterface* _tmp3_ = NULL;
128 		TrackerDBInterface* _tmp4_;
129 		TrackerDBInterface* iface;
130 		gint _tmp5_ = 0;
131 		TrackerClass** _tmp6_ = NULL;
132 #line 31 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
133 		_tmp3_ = tracker_db_manager_get_db_interface ();
134 #line 31 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
135 		_tmp4_ = _g_object_ref0 (_tmp3_);
136 #line 31 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
137 		iface = _tmp4_;
138 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
139 		_tmp6_ = tracker_ontologies_get_classes (&_tmp5_);
140 #line 141 "tracker-statistics.c"
141 		{
142 			TrackerClass** cl_collection = NULL;
143 			gint cl_collection_length1 = 0;
144 			gint _cl_collection_size_ = 0;
145 			gint cl_it = 0;
146 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
147 			cl_collection = _tmp6_;
148 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala"
149 			cl_collection_length1 = _tmp5_;
Value stored to 'cl_collection_length1' is never read
(emitted by clang-analyzer)

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

150 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 151 for (cl_it = 0; cl_it < _tmp5_; cl_it = cl_it + 1) { 152 #line 153 "tracker-statistics.c" 153 TrackerClass* _tmp7_; 154 TrackerClass* cl = NULL; 155 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 156 _tmp7_ = _g_object_ref0 (cl_collection[cl_it]); 157 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 158 cl = _tmp7_; 159 #line 160 "tracker-statistics.c" 160 { 161 TrackerClass* _tmp8_; 162 const gchar* _tmp9_; 163 const gchar* _tmp10_; 164 gboolean _tmp11_ = FALSE; 165 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 166 _tmp8_ = cl; 167 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 168 _tmp9_ = tracker_class_get_name (_tmp8_); 169 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 170 _tmp10_ = _tmp9_; 171 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 172 _tmp11_ = g_str_has_prefix (_tmp10_, "xsd:"); 173 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 174 if (!_tmp11_) { 175 #line 176 "tracker-statistics.c" 176 TrackerDBInterface* _tmp12_; 177 TrackerClass* _tmp13_; 178 const gchar* _tmp14_; 179 const gchar* _tmp15_; 180 TrackerDBStatement* _tmp16_ = NULL; 181 TrackerDBStatement* stmt; 182 TrackerDBStatement* _tmp17_; 183 TrackerDBCursor* _tmp18_ = NULL; 184 TrackerDBCursor* stat_cursor; 185 TrackerDBCursor* _tmp19_; 186 gboolean _tmp20_ = FALSE; 187 gboolean _tmp21_; 188 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 189 _tmp12_ = iface; 190 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 191 _tmp13_ = cl; 192 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 193 _tmp14_ = tracker_class_get_name (_tmp13_); 194 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 195 _tmp15_ = _tmp14_; 196 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 197 _tmp16_ = tracker_db_interface_create_statement (_tmp12_, TRACKER_DB_STATEMENT_CACHE_TYPE_NONE, &_inner_error_, "SELECT COUNT(1) FROM \"%s\"", _tmp15_); 198 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 199 stmt = _tmp16_; 200 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 201 if (_inner_error_ != NULL) { 202 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 203 g_propagate_error (error, _inner_error_); 204 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 205 _g_object_unref0 (cl); 206 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 207 _g_object_unref0 (iface); 208 #line 37 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 209 return NULL; 210 #line 211 "tracker-statistics.c" 211 } 212 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 213 _tmp17_ = stmt; 214 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 215 _tmp18_ = tracker_db_statement_start_cursor (_tmp17_, &_inner_error_); 216 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 217 stat_cursor = _tmp18_; 218 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 219 if (_inner_error_ != NULL) { 220 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 221 g_propagate_error (error, _inner_error_); 222 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 223 _g_object_unref0 (stmt); 224 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 225 _g_object_unref0 (cl); 226 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 227 _g_object_unref0 (iface); 228 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 229 return NULL; 230 #line 231 "tracker-statistics.c" 231 } 232 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 233 _tmp19_ = stat_cursor; 234 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 235 _tmp20_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _tmp19_, NULL, &_inner_error_); 236 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 237 _tmp21_ = _tmp20_; 238 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 239 if (_inner_error_ != NULL) { 240 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 241 g_propagate_error (error, _inner_error_); 242 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 243 _g_object_unref0 (stat_cursor); 244 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 245 _g_object_unref0 (stmt); 246 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 247 _g_object_unref0 (cl); 248 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 249 _g_object_unref0 (iface); 250 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 251 return NULL; 252 #line 253 "tracker-statistics.c" 253 } 254 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 255 if (_tmp21_) { 256 #line 257 "tracker-statistics.c" 257 TrackerClass* _tmp22_; 258 TrackerDBCursor* _tmp23_; 259 gint64 _tmp24_ = 0LL; 260 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 261 _tmp22_ = cl; 262 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 263 _tmp23_ = stat_cursor; 264 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 265 _tmp24_ = tracker_sparql_cursor_get_integer ((TrackerSparqlCursor*) _tmp23_, 0); 266 #line 43 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 267 tracker_class_set_count (_tmp22_, (gint) _tmp24_); 268 #line 269 "tracker-statistics.c" 269 } else { 270 TrackerClass* _tmp25_; 271 const gchar* _tmp26_; 272 const gchar* _tmp27_; 273 #line 45 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 274 _tmp25_ = cl; 275 #line 45 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 276 _tmp26_ = tracker_class_get_name (_tmp25_); 277 #line 45 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 278 _tmp27_ = _tmp26_; 279 #line 45 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 280 g_warning ("Unable to query instance count for class %s", _tmp27_); 281 #line 282 "tracker-statistics.c" 282 } 283 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 284 _g_object_unref0 (stat_cursor); 285 #line 35 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 286 _g_object_unref0 (stmt); 287 #line 288 "tracker-statistics.c" 288 } 289 #line 33 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 290 _g_object_unref0 (cl); 291 #line 292 "tracker-statistics.c" 292 } 293 } 294 } 295 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 296 tracker_statistics_initialized = TRUE; 297 #line 30 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 298 _g_object_unref0 (iface); 299 #line 300 "tracker-statistics.c" 300 } 301 #line 53 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 302 _tmp28_ = g_variant_builder_new ((const GVariantType*) "aas"); 303 #line 53 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 304 builder = _tmp28_; 305 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 306 _tmp30_ = tracker_ontologies_get_classes (&_tmp29_); 307 #line 308 "tracker-statistics.c" 308 { 309 TrackerClass** cl_collection = NULL; 310 gint cl_collection_length1 = 0; 311 gint _cl_collection_size_ = 0; 312 gint cl_it = 0; 313 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 314 cl_collection = _tmp30_; 315 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 316 cl_collection_length1 = _tmp29_;
Value stored to 'cl_collection_length1' is never read
(emitted by clang-analyzer)

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

317 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 318 for (cl_it = 0; cl_it < _tmp29_; cl_it = cl_it + 1) { 319 #line 320 "tracker-statistics.c" 320 TrackerClass* _tmp31_; 321 TrackerClass* cl = NULL; 322 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 323 _tmp31_ = _g_object_ref0 (cl_collection[cl_it]); 324 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 325 cl = _tmp31_; 326 #line 327 "tracker-statistics.c" 327 { 328 TrackerClass* _tmp32_; 329 gint _tmp33_; 330 gint _tmp34_; 331 GVariantBuilder* _tmp35_; 332 GVariantBuilder* _tmp36_; 333 TrackerClass* _tmp37_; 334 const gchar* _tmp38_; 335 const gchar* _tmp39_; 336 GVariantBuilder* _tmp40_; 337 TrackerClass* _tmp41_; 338 gint _tmp42_; 339 gint _tmp43_; 340 gchar* _tmp44_ = NULL; 341 gchar* _tmp45_; 342 GVariantBuilder* _tmp46_; 343 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 344 _tmp32_ = cl; 345 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 346 _tmp33_ = tracker_class_get_count (_tmp32_); 347 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 348 _tmp34_ = _tmp33_; 349 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 350 if (_tmp34_ == 0) { 351 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 352 _g_object_unref0 (cl); 353 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 354 continue; 355 #line 356 "tracker-statistics.c" 356 } 357 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 358 _tmp35_ = builder; 359 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 360 g_variant_builder_open (_tmp35_, (const GVariantType*) "as"); 361 #line 62 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 362 _tmp36_ = builder; 363 #line 62 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 364 _tmp37_ = cl; 365 #line 62 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 366 _tmp38_ = tracker_class_get_name (_tmp37_); 367 #line 62 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 368 _tmp39_ = _tmp38_; 369 #line 62 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 370 g_variant_builder_add (_tmp36_, "s", _tmp39_, NULL); 371 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 372 _tmp40_ = builder; 373 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 374 _tmp41_ = cl; 375 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 376 _tmp42_ = tracker_class_get_count (_tmp41_); 377 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 378 _tmp43_ = _tmp42_; 379 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 380 _tmp44_ = g_strdup_printf ("%i", _tmp43_); 381 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 382 _tmp45_ = _tmp44_; 383 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 384 g_variant_builder_add (_tmp40_, "s", _tmp45_, NULL); 385 #line 63 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 386 _g_free0 (_tmp45_); 387 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 388 _tmp46_ = builder; 389 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 390 g_variant_builder_close (_tmp46_); 391 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 392 _g_object_unref0 (cl); 393 #line 394 "tracker-statistics.c" 394 } 395 } 396 } 397 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 398 _tmp47_ = request; 399 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 400 tracker_dbus_request_end (_tmp47_, NULL); 401 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 402 _tmp48_ = builder; 403 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 404 _tmp49_ = g_variant_builder_end (_tmp48_); 405 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 406 g_variant_ref_sink (_tmp49_); 407 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 408 result = _tmp49_; 409 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 410 _g_variant_builder_unref0 (builder); 411 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 412 return result; 413 #line 414 "tracker-statistics.c" 414 } 415 416 417 TrackerStatistics* tracker_statistics_construct (GType object_type) { 418 TrackerStatistics * self = NULL; 419 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 420 self = (TrackerStatistics*) g_object_new (object_type, NULL); 421 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 422 return self; 423 #line 424 "tracker-statistics.c" 424 } 425 426 427 TrackerStatistics* tracker_statistics_new (void) { 428 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 429 return tracker_statistics_construct (TRACKER_TYPE_STATISTICS); 430 #line 431 "tracker-statistics.c" 431 } 432 433 434 static void tracker_statistics_class_init (TrackerStatisticsClass * klass) { 435 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 436 tracker_statistics_parent_class = g_type_class_peek_parent (klass); 437 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 438 G_OBJECT_CLASS (klass)->finalize = tracker_statistics_finalize; 439 #line 440 "tracker-statistics.c" 440 } 441 442 443 static void tracker_statistics_instance_init (TrackerStatistics * self) { 444 } 445 446 447 static void tracker_statistics_finalize (GObject* obj) { 448 TrackerStatistics * self;
variable 'self' set but not used
(emitted by gcc)
449 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 450 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_TYPE_STATISTICS, TrackerStatistics);
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)

451 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-statistics.vala" 452 G_OBJECT_CLASS (tracker_statistics_parent_class)->finalize (obj); 453 #line 454 "tracker-statistics.c" 454 } 455 456 457 GType tracker_statistics_get_type (void) { 458 static volatile gsize tracker_statistics_type_id__volatile = 0; 459 if (g_once_init_enter (&tracker_statistics_type_id__volatile)) { 460 static const GTypeInfo g_define_type_info = { sizeof (TrackerStatisticsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_statistics_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerStatistics), 0, (GInstanceInitFunc) tracker_statistics_instance_init, NULL }; 461 GType tracker_statistics_type_id; 462 tracker_statistics_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerStatistics", &g_define_type_info, 0); 463 g_type_set_qdata (tracker_statistics_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) tracker_statistics_register_object); 464 g_once_init_leave (&tracker_statistics_type_id__volatile, tracker_statistics_type_id); 465 } 466 return tracker_statistics_type_id__volatile; 467 } 468 469 470 static void _dbus_tracker_statistics_get (TrackerStatistics* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 471 GError* error = NULL; 472 GVariantIter _arguments_iter; 473 GDBusMessage* _reply_message; 474 GVariant* _reply; 475 GVariantBuilder _reply_builder; 476 GVariant* result; 477 g_variant_iter_init (&_arguments_iter, parameters); 478 result = tracker_statistics_get (self, g_dbus_method_invocation_get_sender (invocation), &error); 479 if (error) { 480 g_dbus_method_invocation_return_gerror (invocation, error); 481 return; 482 } 483 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 484 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 485 g_variant_builder_add_value (&_reply_builder, result); 486 _g_variant_unref0 (result); 487 _reply = g_variant_builder_end (&_reply_builder); 488 g_dbus_message_set_body (_reply_message, _reply); 489 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 490 g_object_unref (invocation); 491 g_object_unref (_reply_message); 492 } 493 494 495 static void tracker_statistics_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) { 496 gpointer* data; 497 gpointer object; 498 data = user_data; 499 object = data[0]; 500 if (strcmp (method_name, "Get") == 0) { 501 _dbus_tracker_statistics_get (object, parameters, invocation); 502 } else { 503 g_object_unref (invocation); 504 } 505 } 506 507 508 static GVariant* tracker_statistics_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) { 509 gpointer* data; 510 gpointer object;
variable 'object' set but not used
(emitted by gcc)
511 data = user_data; 512 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)

513 return NULL; 514 } 515 516 517 static gboolean tracker_statistics_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) { 518 gpointer* data; 519 gpointer object;
variable 'object' set but not used
(emitted by gcc)
520 data = user_data; 521 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)

522 return FALSE; 523 } 524 525 526 guint tracker_statistics_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { 527 guint result; 528 gpointer *data; 529 data = g_new (gpointer, 3); 530 data[0] = g_object_ref (object); 531 data[1] = g_object_ref (connection); 532 data[2] = g_strdup (path); 533 result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_tracker_statistics_dbus_interface_info), &_tracker_statistics_dbus_interface_vtable, data, _tracker_statistics_unregister_object, error); 534 if (!result) { 535 return 0; 536 } 537 return result; 538 } 539 540 541 static void _tracker_statistics_unregister_object (gpointer user_data) { 542 gpointer* data; 543 data = user_data; 544 g_object_unref (data[0]); 545 g_object_unref (data[1]); 546 g_free (data[2]); 547 g_free (data); 548 }