replace str->str & g_string_free with g_string_free_and_steal

solving unused warning in GLib 2.76
This commit is contained in:
Ailin Nemui 2025-07-22 11:40:04 +02:00
commit 8eee36d1ea
20 changed files with 73 additions and 78 deletions

View file

@ -88,8 +88,7 @@ static char *dcc_get_rename_file(const char *fname)
num++;
} while (stat(newname->str, &statbuf) == 0);
ret = newname->str;
g_string_free(newname, FALSE);
ret = g_string_free_and_steal(newname);
return ret;
}
@ -416,8 +415,7 @@ char *get_file_name(char **params, int fileparams)
out = g_string_append(out, params[pos]);
}
ret = out->str;
g_string_free(out, FALSE);
ret = g_string_free_and_steal(out);
return ret;
}