diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-04-08 13:43:46 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-04-09 18:09:00 -0700 |
commit | 8099332416df1851a6aa5245ee91d507c7b35546 (patch) | |
tree | 045b1a744cff9b25b8448dc3ad942a56f002440b /meta-oe/recipes-support/gd | |
parent | 71117c3cf299b40be41d9651aef740f524ce2efe (diff) | |
download | meta-openembedded-8099332416df1851a6aa5245ee91d507c7b35546.tar.gz |
gd: fix compile error caused by -Werror=maybe-uninitialized
When enable DEBUG_BUILD, gd compile failed with error:
| ../../git/src/gd_tiff.c:961:64: error: 'image_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| (image_type == GD_PALETTE || image_type == GD_INDEXED || image_type == GD_GRAY)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
actually, this warning is misinformation, we can see the logic from:
https://github.com/libgd/libgd/blob/master/src/gd_tiff.c
image_type will be assigned no matter force_rgba is TRUE/FALSE.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/gd')
-rw-r--r-- | meta-oe/recipes-support/gd/gd_2.2.5.bb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/gd/gd_2.2.5.bb b/meta-oe/recipes-support/gd/gd_2.2.5.bb index 548d2c578..426af2572 100644 --- a/meta-oe/recipes-support/gd/gd_2.2.5.bb +++ b/meta-oe/recipes-support/gd/gd_2.2.5.bb | |||
@@ -35,6 +35,8 @@ EXTRA_OECONF += " --disable-rpath \ | |||
35 | 35 | ||
36 | EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"' | 36 | EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"' |
37 | 37 | ||
38 | DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized" | ||
39 | |||
38 | do_install_append() { | 40 | do_install_append() { |
39 | # cleanup buildpaths from gdlib.pc | 41 | # cleanup buildpaths from gdlib.pc |
40 | sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc | 42 | sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc |