[tracker-miners/wip/hadess/fix-warnings: 1/2] libtracker-miner: Fix uninitialised variable
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/hadess/fix-warnings: 1/2] libtracker-miner: Fix uninitialised variable
- Date: Mon, 22 Feb 2021 15:17:59 +0000 (UTC)
commit 83b9b5537a07ed50a93e2723bfd66cbb585cf8a9
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 22 16:16:08 2021 +0100
libtracker-miner: Fix uninitialised variable
../src/libtracker-miner/tracker-file-notifier.c: In function ‘monitor_item_deleted_cb’:
/usr/include/glib-2.0/glib/gmem.h:122:7: warning: ‘cursor’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
122 | (destroy) (_ptr); \
| ^
../src/libtracker-miner/tracker-file-notifier.c:1051:24: note: ‘cursor’ was declared here
1051 | TrackerSparqlCursor *cursor;
| ^~~~~~
src/libtracker-miner/tracker-file-notifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 050bd6878..b085da348 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -1048,7 +1048,7 @@ monitor_item_deleted_cb (TrackerMonitor *monitor,
if (!is_directory) {
TrackerSparqlStatement *stmt;
- TrackerSparqlCursor *cursor;
+ TrackerSparqlCursor *cursor = NULL;
const gchar *mimetype;
gchar *uri;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]