diff options
author | Ernestas Kulik <ernestask@src.gnome.org> | 2016-08-04 20:17:11 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestask@src.gnome.org> | 2016-08-05 13:01:42 +0300 |
commit | 2c7620a73234e8ef48ade4be1d950d4ca7b4997a (patch) | |
tree | 1b58a0ada80c85266b555135efc3ff2ab24c262e | |
parent | 67073834c9c58e865c7a345c732809df3fe733d6 (diff) | |
download | nautilus-2c7620a73234e8ef48ade4be1d950d4ca7b4997a.tar.gz |
Clean up dead assigments
A static analyzer revealed a number of dead assignments, which
have a negative effect on readability. This commit removes them.
https://bugzilla.gnome.org/show_bug.cgi?id=769526
-rw-r--r-- | src/nautilus-file.c | 1 | ||||
-rw-r--r-- | src/nautilus-files-view.c | 13 | ||||
-rw-r--r-- | src/nautilus-query-editor.c | 1 | ||||
-rw-r--r-- | src/nautilus-search-popover.c | 1 |
4 files changed, 4 insertions, 12 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c index e85ffa355..b380d390d 100644 --- a/src/nautilus-file.c +++ b/src/nautilus-file.c @@ -2159,7 +2159,6 @@ update_info_internal (NautilusFile *file, g_file_info_get_edit_name (info), FALSE); - mime_type = g_file_info_get_content_type (info); file_type = g_file_info_get_file_type (info); if (file->details->type != file_type) { changed = TRUE; diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index cbe8d2f56..097f1f26d 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -2602,7 +2602,7 @@ set_up_scripts_directory_global (void) if (res == -1) { fd = g_creat (updated, 0600); if (fd != -1) { - res = write (fd, message, strlen (message)); + write (fd, message, strlen (message)); close (fd); } } @@ -5597,8 +5597,7 @@ invoke_external_bulk_rename_utility (NautilusFilesView *view, } static void -real_action_rename (NautilusFilesView *view, - gboolean select_all) +real_action_rename (NautilusFilesView *view) { NautilusFile *file; GList *selection; @@ -5615,11 +5614,7 @@ real_action_rename (NautilusFilesView *view, } } else { file = NAUTILUS_FILE (selection->data); - if (!select_all) { - /* directories don't have a file extension, so - * they are always pre-selected as a whole */ - select_all = nautilus_file_is_directory (file); - } + nautilus_files_view_rename_file_popover_new (view, file); } } @@ -5632,7 +5627,7 @@ action_rename (GSimpleAction *action, GVariant *state, gpointer user_data) { - real_action_rename (NAUTILUS_FILES_VIEW (user_data), FALSE); + real_action_rename (NAUTILUS_FILES_VIEW (user_data)); } #define BG_KEY_PRIMARY_COLOR "primary-color" diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c index db836db53..94611386f 100644 --- a/src/nautilus-query-editor.c +++ b/src/nautilus-query-editor.c @@ -658,7 +658,6 @@ nautilus_query_editor_set_location (NautilusQueryEditor *editor, gboolean should_notify; priv = nautilus_query_editor_get_instance_private (editor); - should_notify = FALSE; /* The client could set us a location that is actually a search directory, * like what happens with the slot when updating the query editor location. diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c index 15e3a239e..9693305bf 100644 --- a/src/nautilus-search-popover.c +++ b/src/nautilus-search-popover.c @@ -381,7 +381,6 @@ fill_fuzzy_dates_listbox (NautilusSearchPopover *popover) maximum_dt = g_date_time_new_from_unix_local (0); now = g_date_time_new_now_local (); max_days = SEARCH_FILTER_MAX_YEARS * 365; - current_date = g_date_time_new_now_local (); /* Add the no date filter element first */ row = create_row_for_label (_("Any time"), TRUE); |