blob: abe584874c25eb95110587e497057532cc23adaa [file] [log] [blame]
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001From d8f8859369b228d86aeeb043d732b9c60fdce289 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 24 Mar 2023 15:29:04 -0700
4Subject: [PATCH] initialize GdkDragAction action to 0
5
6This helps in silencing clang found warning
7
8autilus-pathbar.c:759:9: error: variable 'action' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
9 if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST))
10 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11
12Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1158]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/nautilus-pathbar.c | 2 +-
16 src/nautilus-window.c | 2 +-
17 2 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
20index 1b6ea6a..a5ab780 100644
21--- a/src/nautilus-pathbar.c
22+++ b/src/nautilus-pathbar.c
23@@ -746,7 +746,7 @@ on_drag_motion (GtkDropTarget *target,
24 gpointer user_data)
25 {
26 ButtonData *button_data = user_data;
27- GdkDragAction action;
28+ GdkDragAction action = 0;
29 const GValue *value;
30 graphene_point_t start;
31
32diff --git a/src/nautilus-window.c b/src/nautilus-window.c
33index 30299b1..74c548f 100644
34--- a/src/nautilus-window.c
35+++ b/src/nautilus-window.c
36@@ -1476,7 +1476,7 @@ extra_drag_value_cb (AdwTabBar *self,
37 {
38 NautilusWindowSlot *slot = NAUTILUS_WINDOW_SLOT (adw_tab_page_get_child (page));
39 g_autoptr (NautilusFile) file = nautilus_file_get (nautilus_window_slot_get_location (slot));
40- GdkDragAction action;
41+ GdkDragAction action = 0;
42
43 if (value == NULL)
44 {
45--
462.40.0
47