Skip to content

Commit

Permalink
Fix garbage return value warning.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andreas Mohr authored and aborodin committed Dec 18, 2024
1 parent dbd06fd commit 77151fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/widget/wtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/filemanager/boxes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 77151fd

Please sign in to comment.