1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: fix gcc warning on uninitialized variable pos_end

The variable `pos_end` is never used when not initialized anyway, thanks to the
`break` done before.
This commit is contained in:
Sébastien Helleu
2023-08-22 10:20:55 +02:00
parent 39fdb1b564
commit ad75786e15
+3 -3
View File
@@ -862,7 +862,7 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date,
{
time_t date_printed;
char *pos, *pos_end;
int one_line = 0;
int one_line;
if (!message)
return;
@@ -885,9 +885,11 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date,
if (date <= 0)
date = date_printed;
one_line = 0;
pos = vbuffer;
while (pos)
{
pos_end = NULL;
if (!buffer || !buffer->input_multiline)
{
/* display until next end of line */
@@ -911,9 +913,7 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date,
}
if (one_line)
{
break;
}
pos = (pos_end && pos_end[1]) ? pos_end + 1 : NULL;
}