summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch52
-rw-r--r--meta/recipes-sato/puzzles/puzzles_r10116.bb4
2 files changed, 55 insertions, 1 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
diff --git a/meta/recipes-sato/puzzles/puzzles_r10116.bb b/meta/recipes-sato/puzzles/puzzles_r10116.bb
index ef5392b68f..6ee4d962b2 100644
--- a/meta/recipes-sato/puzzles/puzzles_r10116.bb
+++ b/meta/recipes-sato/puzzles/puzzles_r10116.bb
@@ -7,7 +7,9 @@ MOD_PV = "${@d.getVar('PV',1)[1:]}"
7LICENSE = "MIT" 7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc" 8LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
9 9
10SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV}" 10SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV} \
11 file://fix-compiling-failure-with-option-g-O.patch \
12"
11 13
12S = "${WORKDIR}/${BPN}" 14S = "${WORKDIR}/${BPN}"
13 15