diff options
author | António Fernandes <antoniojpfernandes@gmail.com> | 2018-03-05 21:30:14 +0000 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2018-03-05 21:30:14 +0000 |
commit | 61054d5f528c1cb492d15687cf073d898257c897 (patch) | |
tree | 069c3a66dbcc62319145d92f37935cf67d1745d4 /src/nautilus-list-view.c | |
parent | 184532933812d2813b41a09fc01f440b294762a5 (diff) | |
download | nautilus-61054d5f528c1cb492d15687cf073d898257c897.tar.gz |
list-view: Fix build warning
We are using a variable which may be uninitialized (even though it is
initialized in the case where it is used)
GCC8 fails to build due to this.
As that variable is only ever compared with a constant, compare the
return value directly without storing it on a variable.
Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/284
Diffstat (limited to 'src/nautilus-list-view.c')
-rw-r--r-- | src/nautilus-list-view.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c index 9292086d7..d2ba388e8 100644 --- a/src/nautilus-list-view.c +++ b/src/nautilus-list-view.c @@ -1645,7 +1645,6 @@ filename_cell_data_func (GtkTreeViewColumn *column, GString *display_text; NautilusDirectory *directory; NautilusQuery *query = NULL; - NautilusQuerySearchContent content; NautilusFile *file; const gchar *snippet; @@ -1663,11 +1662,6 @@ filename_cell_data_func (GtkTreeViewColumn *column, query = nautilus_search_directory_get_query (NAUTILUS_SEARCH_DIRECTORY (directory)); } - if (query) - { - content = nautilus_query_get_search_content (query); - } - if (get_click_policy () == NAUTILUS_CLICK_POLICY_SINGLE) { path = gtk_tree_model_get_path (model, iter); @@ -1689,7 +1683,8 @@ filename_cell_data_func (GtkTreeViewColumn *column, underline = PANGO_UNDERLINE_NONE; } - if (query && content == NAUTILUS_QUERY_SEARCH_CONTENT_FULL_TEXT) + if (query && + nautilus_query_get_search_content (query) == NAUTILUS_QUERY_SEARCH_CONTENT_FULL_TEXT) { gtk_tree_model_get (model, iter, NAUTILUS_LIST_MODEL_FILE_COLUMN, &file, |