blob: 4ee7543166701c1c111fb42a58a1e3a0cc8e7603 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From: Hongxu Jia <hongxu.jia@windriver.com>
gtk.c: fix compiling failure with option -g -O
There was a compile failure with option -g -O
...
././gtk.c: In function 'main':
././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
fprintf(stderr, "%s: %s\n", pname, error);
^
cc1: all warnings being treated as errors
...
Fix by initializing pointer 'error' with NULL
Upstream-Status: Submitted [email discussion with upstream]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Index: git/gtk.c
===================================================================
--- git.orig/gtk.c
+++ git/gtk.c
@@ -3578,7 +3578,7 @@ static void list_presets_from_menu(struc
int main(int argc, char **argv)
{
char *pname = argv[0];
- char *error;
+ char *error = NULL;
int ngenerate = 0, px = 1, py = 1;
bool print = false;
bool time_generation = false, test_solve = false, list_presets = false;
|