diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-03-24 15:55:23 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-03-25 17:11:22 -0700 |
commit | a67da92aa4cf973a20e57284b41222ebe3349b7e (patch) | |
tree | ef7bd5b9ff8ca3f5d7f9ced5fc7d7d373bdd4f5b | |
parent | b5c36abc0f7d9bfee96bce087326ac45e3584436 (diff) | |
download | meta-openembedded-a67da92aa4cf973a20e57284b41222ebe3349b7e.tar.gz |
nautilus: Fix build with clang and drop unused patch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 48 insertions, 94 deletions
diff --git a/meta-gnome/recipes-gnome/nautilus/nautilus/0001-Provide-parameter-prototype-for-functions-without-pa.patch b/meta-gnome/recipes-gnome/nautilus/nautilus/0001-Provide-parameter-prototype-for-functions-without-pa.patch deleted file mode 100644 index 6c743d8ce7..0000000000 --- a/meta-gnome/recipes-gnome/nautilus/nautilus/0001-Provide-parameter-prototype-for-functions-without-pa.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From 76f1625bae95212ec6d4bc1bd1c8ff1232150c48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 29 Aug 2022 13:14:09 -0700 | ||
4 | Subject: [PATCH] Provide parameter prototype for functions without parameter | ||
5 | |||
6 | Fixes build with clang-15 with -Wstrict-prototypes | ||
7 | |||
8 | src/nautilus-toolbar.c:1205:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] | ||
9 | nautilus_toolbar_new () | ||
10 | ^ | ||
11 | void | ||
12 | |||
13 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/nautilus/-/commit/95d35aedf68f0398a6ee9e0b0af9ce80528fdc22] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/nautilus-file-undo-manager.c | 4 ++-- | ||
17 | src/nautilus-list-model.c | 2 +- | ||
18 | src/nautilus-starred-directory.c | 2 +- | ||
19 | src/nautilus-toolbar.c | 2 +- | ||
20 | src/nautilus-view-model.c | 2 +- | ||
21 | 5 files changed, 6 insertions(+), 6 deletions(-) | ||
22 | |||
23 | diff --git a/src/nautilus-file-undo-manager.c b/src/nautilus-file-undo-manager.c | ||
24 | index 2a886176f..f2d1eebcf 100644 | ||
25 | --- a/src/nautilus-file-undo-manager.c | ||
26 | +++ b/src/nautilus-file-undo-manager.c | ||
27 | @@ -258,13 +258,13 @@ nautilus_file_undo_manager_get_state (void) | ||
28 | |||
29 | |||
30 | gboolean | ||
31 | -nautilus_file_undo_manager_is_operating () | ||
32 | +nautilus_file_undo_manager_is_operating (void) | ||
33 | { | ||
34 | return undo_singleton->is_operating; | ||
35 | } | ||
36 | |||
37 | NautilusFileUndoManager * | ||
38 | -nautilus_file_undo_manager_get () | ||
39 | +nautilus_file_undo_manager_get (void) | ||
40 | { | ||
41 | return undo_singleton; | ||
42 | } | ||
43 | diff --git a/src/nautilus-list-model.c b/src/nautilus-list-model.c | ||
44 | index 7e2aeeeee..741007105 100644 | ||
45 | --- a/src/nautilus-list-model.c | ||
46 | +++ b/src/nautilus-list-model.c | ||
47 | @@ -1625,7 +1625,7 @@ nautilus_list_model_get_drag_view (NautilusListModel *model, | ||
48 | } | ||
49 | |||
50 | GtkTargetList * | ||
51 | -nautilus_list_model_get_drag_target_list () | ||
52 | +nautilus_list_model_get_drag_target_list (void) | ||
53 | { | ||
54 | GtkTargetList *target_list; | ||
55 | |||
56 | diff --git a/src/nautilus-starred-directory.c b/src/nautilus-starred-directory.c | ||
57 | index fd41418a4..07ed62693 100644 | ||
58 | --- a/src/nautilus-starred-directory.c | ||
59 | +++ b/src/nautilus-starred-directory.c | ||
60 | @@ -556,7 +556,7 @@ nautilus_starred_directory_class_init (NautilusFavoriteDirectoryClass *klass) | ||
61 | } | ||
62 | |||
63 | NautilusFavoriteDirectory * | ||
64 | -nautilus_starred_directory_new () | ||
65 | +nautilus_starred_directory_new (void) | ||
66 | { | ||
67 | NautilusFavoriteDirectory *self; | ||
68 | |||
69 | diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c | ||
70 | index 5fe4e63a4..15a696827 100644 | ||
71 | --- a/src/nautilus-toolbar.c | ||
72 | +++ b/src/nautilus-toolbar.c | ||
73 | @@ -1202,7 +1202,7 @@ nautilus_toolbar_class_init (NautilusToolbarClass *klass) | ||
74 | } | ||
75 | |||
76 | GtkWidget * | ||
77 | -nautilus_toolbar_new () | ||
78 | +nautilus_toolbar_new (void) | ||
79 | { | ||
80 | return g_object_new (NAUTILUS_TYPE_TOOLBAR, | ||
81 | NULL); | ||
82 | diff --git a/src/nautilus-view-model.c b/src/nautilus-view-model.c | ||
83 | index 84c40302d..2935809ae 100644 | ||
84 | --- a/src/nautilus-view-model.c | ||
85 | +++ b/src/nautilus-view-model.c | ||
86 | @@ -190,7 +190,7 @@ compare_data_func (gconstpointer a, | ||
87 | } | ||
88 | |||
89 | NautilusViewModel * | ||
90 | -nautilus_view_model_new () | ||
91 | +nautilus_view_model_new (void) | ||
92 | { | ||
93 | return g_object_new (NAUTILUS_TYPE_VIEW_MODEL, NULL); | ||
94 | } | ||
diff --git a/meta-gnome/recipes-gnome/nautilus/nautilus/0001-initialize-GdkDragAction-action-to-0.patch b/meta-gnome/recipes-gnome/nautilus/nautilus/0001-initialize-GdkDragAction-action-to-0.patch new file mode 100644 index 0000000000..abe584874c --- /dev/null +++ b/meta-gnome/recipes-gnome/nautilus/nautilus/0001-initialize-GdkDragAction-action-to-0.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From d8f8859369b228d86aeeb043d732b9c60fdce289 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 24 Mar 2023 15:29:04 -0700 | ||
4 | Subject: [PATCH] initialize GdkDragAction action to 0 | ||
5 | |||
6 | This helps in silencing clang found warning | ||
7 | |||
8 | autilus-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 | |||
12 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1158] | ||
13 | Signed-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 | |||
19 | diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c | ||
20 | index 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 | |||
32 | diff --git a/src/nautilus-window.c b/src/nautilus-window.c | ||
33 | index 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 | -- | ||
46 | 2.40.0 | ||
47 | |||
diff --git a/meta-gnome/recipes-gnome/nautilus/nautilus_44.0.bb b/meta-gnome/recipes-gnome/nautilus/nautilus_44.0.bb index 8fe58a77d8..e066556177 100644 --- a/meta-gnome/recipes-gnome/nautilus/nautilus_44.0.bb +++ b/meta-gnome/recipes-gnome/nautilus/nautilus_44.0.bb | |||
@@ -26,6 +26,7 @@ inherit gnomebase gsettings gobject-introspection gtk-doc gettext features_check | |||
26 | def gnome_verdir(v): | 26 | def gnome_verdir(v): |
27 | return oe.utils.trim_version(v, 1) | 27 | return oe.utils.trim_version(v, 1) |
28 | 28 | ||
29 | SRC_URI += "file://0001-initialize-GdkDragAction-action-to-0.patch" | ||
29 | SRC_URI[archive.sha256sum] = "57b99ebb8e2b9c1512d381e53096188c087b33410d6c52d87a27bd60ee76ac7f" | 30 | SRC_URI[archive.sha256sum] = "57b99ebb8e2b9c1512d381e53096188c087b33410d6c52d87a27bd60ee76ac7f" |
30 | 31 | ||
31 | REQUIRED_DISTRO_FEATURES = "x11 opengl" | 32 | REQUIRED_DISTRO_FEATURES = "x11 opengl" |