From 06a838b0fb98b494f41333d423d297afead4079a Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Fri, 17 Mar 2023 10:49:25 +0100 Subject: properties-window: Use return value from g_string_free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the `ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’` warning is shown during build. This is because the `str` struct member is used instead of a return value from the `g_string_free` function. Let's update the code to use the return value in order to avoid this warning. --- src/nautilus-properties-window.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c index e9e24264f..171cb626e 100644 --- a/src/nautilus-properties-window.c +++ b/src/nautilus-properties-window.c @@ -3748,7 +3748,6 @@ get_pending_key (GList *file_list) GList *uris = NULL; GList *l; GString *key; - char *ret; uris = NULL; for (l = file_list; l != NULL; l = l->next) @@ -3766,10 +3765,7 @@ get_pending_key (GList *file_list) g_list_free_full (uris, g_free); - ret = key->str; - g_string_free (key, FALSE); - - return ret; + return g_string_free (key, FALSE); } static StartupData * -- cgit v1.2.1