From 1ece5b341f5db7f9e098ce60c660672f0c6c7b4c Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Wed, 18 Dec 2024 14:00:00 +0000
Subject: [PATCH] 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>
---
lib/widget/wtools.c | 2 +-
src/filemanager/boxes.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/widget/wtools.c b/lib/widget/wtools.c
index b0a31c76a..040417ab5 100644
a
|
b
|
fg_input_dialog_help (const char *header, const char *text, const char *help, |
154 | 154 | char *p_text; |
155 | 155 | char histname[64] = "inp|"; |
156 | 156 | gboolean is_passwd = FALSE; |
157 | | char *my_str; |
| 157 | char *my_str = NULL; |
158 | 158 | int ret; |
159 | 159 | |
160 | 160 | /* label text */ |
diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
index 279926690..6c7f0cda2 100644
a
|
b
|
char * |
1218 | 1218 | cd_box (const WPanel *panel) |
1219 | 1219 | { |
1220 | 1220 | const Widget *w = CONST_WIDGET (panel); |
1221 | | char *my_str; |
| 1221 | char *my_str = NULL; |
1222 | 1222 | |
1223 | 1223 | quick_widget_t quick_widgets[] = { |
1224 | 1224 | QUICK_LABELED_INPUT (N_("cd"), input_label_left, "", "input", &my_str, NULL, FALSE, TRUE, |