summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2023-03-17 10:49:25 +0100
committerOndrej Holy <oholy@redhat.com>2023-03-29 13:43:10 +0000
commit06a838b0fb98b494f41333d423d297afead4079a (patch)
treed7eaef6b531855b05bbadaa91279d7927c263c9a
parentfbbfa749bdc3afc0bb4f738c21dc9658d7462556 (diff)
downloadnautilus-06a838b0fb98b494f41333d423d297afead4079a.tar.gz
properties-window: Use return value from g_string_free
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.
-rw-r--r--src/nautilus-properties-window.c6
1 files changed, 1 insertions, 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 *