mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +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
6db1942bb1
commit
427d239008
1 changed files with 1 additions and 4 deletions
|
@ -54,21 +54,18 @@
|
|||
vec4f_t
|
||||
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)
|
||||
Sys_Error ("Don't know how to compute the barycentric coordinates "
|
||||
"for %d points", num_points);
|
||||
switch (num_points) {
|
||||
case 1:
|
||||
l = zero;
|
||||
l[0] = 1;
|
||||
return l;
|
||||
case 2:
|
||||
x = p - *points[0];
|
||||
a = *points[1] - *points[0];
|
||||
d = dotf (x, a) / dotf (a, a);
|
||||
l = zero;
|
||||
l[1] = d[0];
|
||||
l[0] = 1 - d[0];
|
||||
return l;
|
||||
|
|
Loading…
Reference in a new issue