From 3ba19d19a8aa417231f667d61326dcbbaeab196c Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Tue, 6 Dec 2016 10:17:57 +0000
Subject: [PATCH] (dialogs.c) Cleanup maybe-uninitialized compiler warning
Found by GCC 6.2.0.
dialogs.c: In function 'mcview_dialog_search':
dialogs.c:87:24: error: 'num_of_types' may be used uninitialized in this function [-Werror=maybe-uninitialized]
dialogs.c:81:12: note: 'num_of_types' was declared here
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/viewer/dialogs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/viewer/dialogs.c b/src/viewer/dialogs.c
index 844b9ae..7560977 100644
a
|
b
|
mcview_dialog_search (WView * view) |
78 | 78 | { |
79 | 79 | char *exp = NULL; |
80 | 80 | int qd_result; |
81 | | size_t num_of_types; |
| 81 | size_t num_of_types = 0; |
82 | 82 | gchar **list_of_types; |
83 | 83 | |
84 | 84 | list_of_types = mc_search_get_types_strings_array (&num_of_types); |