diff options
Diffstat (limited to 'meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch')
-rw-r--r-- | meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch new file mode 100644 index 0000000000..d246feeb09 --- /dev/null +++ b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | gtk.c: fix compiling failure with option -g -O | ||
2 | |||
3 | There were compiling failure with option -g -O | ||
4 | ... | ||
5 | ././gtk.c: In function 'configure_area': | ||
6 | ././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
7 | cairo_set_source_rgb(cr, | ||
8 | ^ | ||
9 | ././gtk.c:384:14: note: 'cr' was declared here | ||
10 | cairo_t *cr; | ||
11 | ^ | ||
12 | ././gtk.c: In function 'main': | ||
13 | ././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
14 | fprintf(stderr, "%s: %s\n", pname, error); | ||
15 | ^ | ||
16 | cc1: all warnings being treated as errors | ||
17 | ... | ||
18 | |||
19 | Initialized pointer 'cr' and 'error' with NULL | ||
20 | |||
21 | Upstream-Status: Pending | ||
22 | |||
23 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
24 | --- | ||
25 | gtk.c | 4 ++-- | ||
26 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/gtk.c b/gtk.c | ||
29 | index a2eba2c..c54bf63 100644 | ||
30 | --- a/gtk.c | ||
31 | +++ b/gtk.c | ||
32 | @@ -381,7 +381,7 @@ static void clear_backing_store(frontend *fe) | ||
33 | |||
34 | static void setup_backing_store(frontend *fe) | ||
35 | { | ||
36 | - cairo_t *cr; | ||
37 | + cairo_t *cr = NULL; | ||
38 | int i; | ||
39 | |||
40 | fe->pixmap = gdk_pixmap_new(fe->area->window, fe->pw, fe->ph, -1); | ||
41 | @@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp) | ||
42 | int main(int argc, char **argv) | ||
43 | { | ||
44 | char *pname = argv[0]; | ||
45 | - char *error; | ||
46 | + char *error = NULL; | ||
47 | int ngenerate = 0, print = FALSE, px = 1, py = 1; | ||
48 | int time_generation = FALSE, test_solve = FALSE, list_presets = FALSE; | ||
49 | int soln = FALSE, colour = FALSE; | ||
50 | -- | ||
51 | 1.9.1 | ||
52 | |||