All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: [meta-oe][PATCH] opengl-es-cts: Disable -Wuninitialized for external/amber
Date: Wed,  3 Mar 2021 12:17:07 -0800	[thread overview]
Message-ID: <20210303201707.2808412-1-raj.khem@gmail.com> (raw)

the code in verifier.cc needs to be ported to use enums or memcpy as it
violates aliasing rules. Until then disable the warning

HexFloat16ToFloat, HexFloat10ToFloat, HexFloat11ToFloat are the
functions to be reworked in external/amber/src/src/verifier.cc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 ...-not-error-on-uninitialized-warnings.patch | 28 +++++++++++++++++++
 .../vk-gl-cts/opengl-es-cts_3.2.6.1.bb        |  2 ++
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch

diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch
new file mode 100644
index 0000000000..4f3c7554cf
--- /dev/null
+++ b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch
@@ -0,0 +1,28 @@
+From f9906a3a1b7f1ade7a6c4e1a8aa67cb3a5e663a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 3 Mar 2021 11:33:15 -0800
+Subject: [PATCH] Do not error on uninitialized warnings
+
+code in verifier.cc violates C/C++ aliasing rules so code should be
+perhaps changed to use a union
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ external/amber/src/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/external/amber/src/CMakeLists.txt b/external/amber/src/CMakeLists.txt
+index 80a0df7..4323c81 100644
+--- a/external/amber/src/CMakeLists.txt
++++ b/external/amber/src/CMakeLists.txt
+@@ -133,6 +133,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+     -Werror
+     -Wextra
+     -Wno-unknown-pragmas
++    -Wno-error=uninitialized
+     -Wpedantic
+     -pedantic-errors)
+ elseif(MSVC)
+--
+2.30.1
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb
index 801bd05c91..184547aa76 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb
+++ b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb
@@ -9,6 +9,8 @@ SRCREV_spirv-headers = "e4322e3be589e1ddd44afb20ea842a977c1319b8"
 SRCREV_spirv-tools = "1eb89172a82b436d8037e8a8c29c80f7e1f7df74"
 SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e"
 
+SRC_URI += "file://0001-Do-not-error-on-uninitialized-warnings.patch"
+
 S = "${WORKDIR}/git"
 
 do_install() {
-- 
2.30.1


                 reply	other threads:[~2021-03-03 20:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210303201707.2808412-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=openembedded-devel@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.