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

@ -1,5 +1,6 @@
#include "module.h"
#include <irssi/src/core/signals.h>
#include <irssi/src/core/misc.h>
#include <irssi/src/fe-text/terminfo-core.h>
#ifndef _POSIX_VDISABLE
@ -678,8 +679,7 @@ static int term_setup(TERM_REC *term)
if (term->TI_ritm &&
(term->TI_sgr0 == NULL || g_strcmp0(term->TI_ritm, term->TI_sgr0) != 0))
g_string_append(str, term->TI_ritm);
term->TI_normal = str->str;
g_string_free(str, FALSE);
term->TI_normal = g_string_free_and_steal(str);
term->tr_set_normal = _set_normal;
term->tr_beep = term->TI_bel ? _beep : _ignore;