[oe-commits] [meta-openembedded] 13/30: gd: fix compile error caused by -Werror=maybe-uninitialized

git at git.openembedded.org git at git.openembedded.org
Wed Apr 10 00:51:11 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 7a20d1d546d3631e17f4b4634e0c75c716bb4e10
Author: Changqing Li <changqing.li at windriver.com>
AuthorDate: Mon Apr 8 13:43:46 2019 +0800

    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 at windriver.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-oe/recipes-support/gd/gd_2.2.5.bb | 2 ++
 1 file changed, 2 insertions(+)

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 548d2c5..426af25 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 \
 
 EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"'
 
+DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized"
+
 do_install_append() {
     # cleanup buildpaths from gdlib.pc
     sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list