summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
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
parent28e3f8ca6ff681f7a88c44b5c62390fa16be816b (diff)
downloadast2050-yocto-poky-ffb4933475e3214f103d9db98f6a71b60640b215.zip
ast2050-yocto-poky-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')
-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 0000000..d246fee
--- /dev/null
+++ b/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
@@ -0,0 +1,52 @@
+gtk.c: fix compiling failure with option -g -O
+
+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 pointer 'cr' and 'error' with NULL
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gtk.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gtk.c b/gtk.c
+index a2eba2c..c54bf63 100644
+--- a/gtk.c
++++ b/gtk.c
+@@ -381,7 +381,7 @@ static void clear_backing_store(frontend *fe)
+
+ static void setup_backing_store(frontend *fe)
+ {
+- cairo_t *cr;
++ cairo_t *cr = NULL;
+ int i;
+
+ fe->pixmap = gdk_pixmap_new(fe->area->window, fe->pw, fe->ph, -1);
+@@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp)
+ int main(int argc, char **argv)
+ {
+ char *pname = argv[0];
+- char *error;
++ char *error = NULL;
+ int ngenerate = 0, print = FALSE, px = 1, py = 1;
+ int time_generation = FALSE, test_solve = FALSE, list_presets = FALSE;
+ int soln = FALSE, colour = FALSE;
+--
+1.9.1
+
diff --git a/meta/recipes-sato/puzzles/puzzles_r10116.bb b/meta/recipes-sato/puzzles/puzzles_r10116.bb
index ef5392b..6ee4d96 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:]}"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
-SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV}"
+SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV} \
+ file://fix-compiling-failure-with-option-g-O.patch \
+"
S = "${WORKDIR}/${BPN}"
OpenPOWER on IntegriCloud