]> code.ossystems Code Review - openembedded-core.git/commit
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:01:36 +0000 (23:01 +0100)
commit2281180499cf3bec5c7e75cb596725dab190f72c
treea497f65d8dd1310863329cbddde34737208677d1
parent20992e8a00c585ab6b0611ca23ccd57e2b86b727
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]

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