summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/puzzles/files
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-08-11 12:39:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-23 23:02:00 +0100
commitffb4933475e3214f103d9db98f6a71b60640b215 (patch)
tree51e5c6c0bed117dc248bd1a57f0821906beb2a33 /meta/recipes-sato/puzzles/files
parent28e3f8ca6ff681f7a88c44b5c62390fa16be816b (diff)
downloadpoky-ffb4933475e3214f103d9db98f6a71b60640b215.tar.gz
puzzles: fix do_compile failed when DEBUG_BUILD
There were compiling failure with option -g -O ... ././gtk.c: In function 'configure_area': ././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized] cairo_set_source_rgb(cr, ^ ././gtk.c:384:14: note: 'cr' was declared here cairo_t *cr; ^ ././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 ... Initialized the pointers 'cr' and 'error' with NULL [YOCTO #6410] (From OE-Core rev: 2281180499cf3bec5c7e75cb596725dab190f72c) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato/puzzles/files')
-rw-r--r--meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch52
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 @@
1gtk.c: fix compiling failure with option -g -O
2
3There 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 ^
16cc1: all warnings being treated as errors
17...
18
19Initialized pointer 'cr' and 'error' with NULL
20
21Upstream-Status: Pending
22
23Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24---
25 gtk.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/gtk.c b/gtk.c
29index 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--
511.9.1
52