summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorZi Ree <81702435+zi-ree@users.noreply.github.com>2024-07-12 18:08:56 +0200
committerGitHub <noreply@github.com>2024-07-12 19:08:56 +0300
commitaf93e581929f79b9a21ead6fca0a3c58c498b0d5 (patch)
tree8583f07594472ff66be59fabb549b2495b91abe6 /indra/newview
parentbecdc46bdc319b513e24f4338f6b8d95fab45575 (diff)
Initialize array before use (#2011)
gcc detects usage of this array as uninitialized, so make sure it's initialized. I am not sure if this is a legitimate warning, or if the code guarantees the array gets initialized before use in lines 140-142 and this is a performance optimization.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/gltf/primitive.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp
index e1579374d4..81caff8ab2 100644
--- a/indra/newview/gltf/primitive.cpp
+++ b/indra/newview/gltf/primitive.cpp
@@ -109,7 +109,7 @@ struct MikktMesh
for (U32 tri_idx = 0; tri_idx < U32(triangle_count); ++tri_idx)
{
- U32 idx[3];
+ U32 idx[3] = {0, 0, 0};
if (prim->mMode == Primitive::Mode::TRIANGLES)
{