All of lore.kernel.org
 help / color / mirror / Atom feed
From: <changqing.li@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] cogl: fix compile error with -Werror=maybe-uninitialized
Date: Tue, 2 Apr 2019 17:08:33 +0800	[thread overview]
Message-ID: <1554196113-200535-1-git-send-email-changqing.li@windriver.com> (raw)

From: Changqing Li <changqing.li@windriver.com>

fix below compile error with -Werror=maybe-uninitialized

| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:217:17: error: 'gltype' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|      *out_gltype = gltype;
|      ~~~~~~~~~~~~^~~~~~~~
| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:213:22: error: 'glintformat' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|      *out_glintformat = glintformat;
|      ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 ...mpile-error-with-Werror-maybe-uninitializ.patch | 40 ++++++++++++++++++++++
 meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb      |  4 ++-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch

diff --git a/meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch b/meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch
new file mode 100644
index 0000000..3c99d25
--- /dev/null
+++ b/meta/recipes-graphics/cogl/cogl-1.0/0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch
@@ -0,0 +1,40 @@
+From e05ee89fcc978fceccab3e4724a3a37f7a338499 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 2 Apr 2019 14:48:49 +0800
+Subject: [PATCH] cogl: fix compile error with -Werror=maybe-uninitialized
+
+fix below compile error with -Werror=maybe-uninitialized
+
+| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:217:17: error: 'gltype' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+|      *out_gltype = gltype;
+|      ~~~~~~~~~~~~^~~~~~~~
+| ../../cogl-1.22.2/cogl/driver/gl/gles/cogl-driver-gles.c:213:22: error: 'glintformat' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+|      *out_glintformat = glintformat;
+|      ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
+
+Upstream-Status: Submitted [https://github.com/GNOME/cogl/pull/4/commits/be7a7b983952d3f2ce2cbaa7b89f413b92e15066]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ cogl/driver/gl/gles/cogl-driver-gles.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
+index e94449f..a59d815 100644
+--- a/cogl/driver/gl/gles/cogl-driver-gles.c
++++ b/cogl/driver/gl/gles/cogl-driver-gles.c
+@@ -74,9 +74,9 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
+                                  GLenum *out_gltype)
+ {
+   CoglPixelFormat required_format;
+-  GLenum glintformat;
++  GLenum glintformat = 0;
+   GLenum glformat = 0;
+-  GLenum gltype;
++  GLenum gltype = 0;
+ 
+   required_format = format;
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb b/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
index 5901062..5ddeb4a 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
+++ b/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
@@ -1,7 +1,9 @@
 require cogl-1.0.inc
 
 SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch \
-            file://0001-Fix-an-incorrect-preprocessor-conditional.patch"
+            file://0001-Fix-an-incorrect-preprocessor-conditional.patch \
+            file://0001-cogl-fix-compile-error-with-Werror-maybe-uninitializ.patch \
+           "
 SRC_URI[archive.md5sum] = "d53b708ca7c4af03d7254e46945d6b33"
 SRC_URI[archive.sha256sum] = "39a718cdb64ea45225a7e94f88dddec1869ab37a21b339ad058a9d898782c00d"
 
-- 
2.7.4



             reply	other threads:[~2019-04-02  9:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02  9:08 changqing.li [this message]
2019-04-02 11:31 ` [PATCH] cogl: fix compile error with -Werror=maybe-uninitialized Adrian Bunk
2019-04-03  2:29   ` Changqing Li
2019-04-03  9:58     ` Adrian Bunk
2019-04-04  2:06       ` Changqing Li
2019-04-04  8:11         ` Adrian Bunk
2019-04-08  2:12           ` Changqing Li
2019-04-04 13:42 ` Burton, Ross
2019-04-08  2:14   ` Changqing Li
2019-04-08  6:01   ` [PATCH V2] " changqing.li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554196113-200535-1-git-send-email-changqing.li@windriver.com \
    --to=changqing.li@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.