Skip to contentSkip to conversation

opengl-es-cts: Disable -Wuninitialized for external/amber

PATCH New Khem Raj 1 participant 1 message Mar 3, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 opengl-es-cts: Disable -Wuninitialized for external/amber

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

Cc Dmitry Baryshkov <[email protected]>
---
 ...-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
meta-oe/recipes-graphics/vk-gl-cts/files/0001-Do-not-error-on-uninitialized-warnings.patch new file +28 -0
new file mode 100644
index 0000000000..4f3c7554cf
@@ -0,0 +1,28 @@
+From f9906a3a1b7f1ade7a6c4e1a8aa67cb3a5e663a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb +2 -0
index 801bd05c91..184547aa76 100644
@@ -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() {
Signature · 1 line
2.30.1