Fix garbage return value warning.

Make Static Analyzer happy.

Bug Group   Bug Type              File                     Function/Method       Line
Logic error Garbage return value  src/filemanager/boxes.c  cd_box                1236
Logic error Garbage return value  lib/widget/wtools.c      fg_input_dialog_help  198

Found by Clang-19 Static Analyzer.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2024-12-18 14:00:00 +00:00 committed by Andrew Borodin
parent dbd06fdeda
commit 77151fd3fe
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ fg_input_dialog_help (const char *header, const char *text, const char *help,
char *p_text;
char histname[64] = "inp|";
gboolean is_passwd = FALSE;
char *my_str;
char *my_str = NULL;
int ret;
/* label text */

View File

@ -1218,7 +1218,7 @@ char *
cd_box (const WPanel *panel)
{
const Widget *w = CONST_WIDGET (panel);
char *my_str;
char *my_str = NULL;
quick_widget_t quick_widgets[] = {
QUICK_LABELED_INPUT (N_("cd"), input_label_left, "", "input", &my_str, NULL, FALSE, TRUE,