summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-06-04 13:01:40 -0700
committerKhem Raj <raj.khem@gmail.com>2021-06-05 06:06:27 -0700
commit623b4747d1201d8ed6732fc2e6dbfadb081ceddd (patch)
treeb1c851f26bce54640b19279f542db7cf4ea72283 /meta-oe
parent2faae996e1139415021e0f1c6a1987b578954e3f (diff)
downloadmeta-openembedded-623b4747d1201d8ed6732fc2e6dbfadb081ceddd.tar.gz
glm: Fix additional clang warnings
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch131
1 files changed, 123 insertions, 8 deletions
diff --git a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
index 25e851883..3a62fffe3 100644
--- a/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
+++ b/meta-oe/recipes-graphics/glm/glm/0001-Silence-clang-warnings.patch
@@ -1,6 +1,6 @@
1From 5b83983b246cff440de4421696b6b5dd9072ed2d Mon Sep 17 00:00:00 2001 1From bd9b5060bc3b9581090d44f15b4e236566ea86a6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 6 Feb 2021 11:36:23 -0800 3Date: Fri, 4 Jun 2021 12:57:57 -0700
4Subject: [PATCH] Silence clang warnings 4Subject: [PATCH] Silence clang warnings
5 5
6Fixes 6Fixes
@@ -12,15 +12,22 @@ glm/gtc/../ext/quaternion_common.inl:76:87: error: unused parameter 'k' [-Werror
12 GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k) 12 GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k)
13 ^ 13 ^
14 14
15and
16
17test/gtx/gtx_fast_trigonometry.cpp:135:9: error: variable 'result' set but not used [-Werror,-Wunused-but-set-variable]
18| float result = 0.f;
19| ^
20
15Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/1055] 21Upstream-Status: Submitted [https://github.com/g-truc/glm/pull/1055]
16Signed-off-by: Khem Raj <raj.khem@gmail.com> 22Signed-off-by: Khem Raj <raj.khem@gmail.com>
17--- 23---
18 glm/ext/quaternion_common.inl | 2 +- 24 glm/ext/quaternion_common.inl | 2 +-
19 glm/gtc/random.inl | 2 +- 25 glm/gtc/random.inl | 2 +-
20 2 files changed, 2 insertions(+), 2 deletions(-) 26 test/gtx/gtx_fast_trigonometry.cpp | 30 ++++++++++++------------------
27 3 files changed, 14 insertions(+), 20 deletions(-)
21 28
22diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl 29diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl
23index 0e4a3bb2..8f9dccef 100644 30index 0e4a3bb2..6f99f52d 100644
24--- a/glm/ext/quaternion_common.inl 31--- a/glm/ext/quaternion_common.inl
25+++ b/glm/ext/quaternion_common.inl 32+++ b/glm/ext/quaternion_common.inl
26@@ -104,7 +104,7 @@ namespace glm 33@@ -104,7 +104,7 @@ namespace glm
@@ -28,7 +35,7 @@ index 0e4a3bb2..8f9dccef 100644
28 // Graphics Gems III, page 96 35 // Graphics Gems III, page 96
29 T angle = acos(cosTheta); 36 T angle = acos(cosTheta);
30- T phi = angle + k * glm::pi<T>(); 37- T phi = angle + k * glm::pi<T>();
31+ T phi = angle + static_cast<float>(k) * glm::pi<T>(); 38+ T phi = angle + static_cast<T>(k) * glm::pi<T>();
32 return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle); 39 return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle);
33 } 40 }
34 } 41 }
@@ -45,6 +52,114 @@ index 70485098..a4af2a06 100644
45 } 52 }
46 }; 53 };
47 54
55diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp
56index 8bf86ba0..ddaa708b 100644
57--- a/test/gtx/gtx_fast_trigonometry.cpp
58+++ b/test/gtx/gtx_fast_trigonometry.cpp
59@@ -19,15 +19,14 @@ namespace fastCos
60 {
61 const float begin = -glm::pi<float>();
62 const float end = glm::pi<float>();
63- float result = 0.f;
64
65 const std::clock_t timestamp1 = std::clock();
66 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
67- result = glm::fastCos(i);
68+ glm::fastCos(i);
69
70 const std::clock_t timestamp2 = std::clock();
71 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
72- result = glm::cos(i);
73+ glm::cos(i);
74
75 const std::clock_t timestamp3 = std::clock();
76 const std::clock_t time_fast = timestamp2 - timestamp1;
77@@ -53,15 +52,14 @@ namespace fastSin
78 {
79 const float begin = -glm::pi<float>();
80 const float end = glm::pi<float>();
81- float result = 0.f;
82
83 const std::clock_t timestamp1 = std::clock();
84 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
85- result = glm::fastSin(i);
86+ glm::fastSin(i);
87
88 const std::clock_t timestamp2 = std::clock();
89 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
90- result = glm::sin(i);
91+ glm::sin(i);
92
93 const std::clock_t timestamp3 = std::clock();
94 const std::clock_t time_fast = timestamp2 - timestamp1;
95@@ -79,15 +77,14 @@ namespace fastTan
96 {
97 const float begin = -glm::pi<float>();
98 const float end = glm::pi<float>();
99- float result = 0.f;
100
101 const std::clock_t timestamp1 = std::clock();
102 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
103- result = glm::fastTan(i);
104+ glm::fastTan(i);
105
106 const std::clock_t timestamp2 = std::clock();
107 for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
108- result = glm::tan(i);
109+ glm::tan(i);
110
111 const std::clock_t timestamp3 = std::clock();
112 const std::clock_t time_fast = timestamp2 - timestamp1;
113@@ -105,15 +102,14 @@ namespace fastAcos
114 {
115 const float begin = -glm::pi<float>();
116 const float end = glm::pi<float>();
117- float result = 0.f;
118
119 const std::clock_t timestamp1 = std::clock();
120 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
121- result = glm::fastAcos(i);
122+ glm::fastAcos(i);
123
124 const std::clock_t timestamp2 = std::clock();
125 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
126- result = glm::acos(i);
127+ glm::acos(i);
128
129 const std::clock_t timestamp3 = std::clock();
130 const std::clock_t time_fast = timestamp2 - timestamp1;
131@@ -132,13 +128,12 @@ namespace fastAsin
132 {
133 const float begin = -glm::pi<float>();
134 const float end = glm::pi<float>();
135- float result = 0.f;
136 const std::clock_t timestamp1 = std::clock();
137 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
138- result = glm::fastAsin(i);
139+ glm::fastAsin(i);
140 const std::clock_t timestamp2 = std::clock();
141 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
142- result = glm::asin(i);
143+ glm::asin(i);
144 const std::clock_t timestamp3 = std::clock();
145 const std::clock_t time_fast = timestamp2 - timestamp1;
146 const std::clock_t time_default = timestamp3 - timestamp2;
147@@ -155,13 +150,12 @@ namespace fastAtan
148 {
149 const float begin = -glm::pi<float>();
150 const float end = glm::pi<float>();
151- float result = 0.f;
152 const std::clock_t timestamp1 = std::clock();
153 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
154- result = glm::fastAtan(i);
155+ glm::fastAtan(i);
156 const std::clock_t timestamp2 = std::clock();
157 for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f)
158- result = glm::atan(i);
159+ glm::atan(i);
160 const std::clock_t timestamp3 = std::clock();
161 const std::clock_t time_fast = timestamp2 - timestamp1;
162 const std::clock_t time_default = timestamp3 - timestamp2;
48-- 163--
492.30.0 1642.31.1
50 165