mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[simd] Fix uninitialized warning hidden by lto
It turns out lto was hiding an uninitialized warning that showed up with gcc-14.
This commit is contained in:
parent
3f61d22e6a
commit
79bebde069
1 changed files with 1 additions and 4 deletions
|
@ -54,21 +54,18 @@
|
||||||
vec4f_t
|
vec4f_t
|
||||||
BarycentricCoords_vf (const vec4f_t **points, int num_points, const vec4f_t p)
|
BarycentricCoords_vf (const vec4f_t **points, int num_points, const vec4f_t p)
|
||||||
{
|
{
|
||||||
vec4f_t zero = { };
|
vec4f_t a, b, c, x, l = {}, ab, bc, ca, d;
|
||||||
vec4f_t a, b, c, x, l, ab, bc, ca, d;
|
|
||||||
if (num_points > 4)
|
if (num_points > 4)
|
||||||
Sys_Error ("Don't know how to compute the barycentric coordinates "
|
Sys_Error ("Don't know how to compute the barycentric coordinates "
|
||||||
"for %d points", num_points);
|
"for %d points", num_points);
|
||||||
switch (num_points) {
|
switch (num_points) {
|
||||||
case 1:
|
case 1:
|
||||||
l = zero;
|
|
||||||
l[0] = 1;
|
l[0] = 1;
|
||||||
return l;
|
return l;
|
||||||
case 2:
|
case 2:
|
||||||
x = p - *points[0];
|
x = p - *points[0];
|
||||||
a = *points[1] - *points[0];
|
a = *points[1] - *points[0];
|
||||||
d = dotf (x, a) / dotf (a, a);
|
d = dotf (x, a) / dotf (a, a);
|
||||||
l = zero;
|
|
||||||
l[1] = d[0];
|
l[1] = d[0];
|
||||||
l[0] = 1 - d[0];
|
l[0] = 1 - d[0];
|
||||||
return l;
|
return l;
|
||||||
|
|
Loading…
Reference in a new issue