puzzles: fix do_compile failed when DEBUG_BUILD
authorHongxu Jia <hongxu.jia@windriver.com>
Mon, 11 Aug 2014 04:39:53 +0000 (12:39 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Aug 2014 22:02:00 +0000 (23:02 +0100)
commitb79c3f0cb58b9ccf2a8e3dd35fc8fb8d05a601b9
tree95acb5dda6406aad782e7800b648ed91fc225118
parentfcb4c82e09c766f945654902cb9e0c92d02cfb3f
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>
meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch [new file with mode: 0644]
meta/recipes-sato/puzzles/puzzles_r10116.bb