From af93e581929f79b9a21ead6fca0a3c58c498b0d5 Mon Sep 17 00:00:00 2001 From: Zi Ree <81702435+zi-ree@users.noreply.github.com> Date: Fri, 12 Jul 2024 18:08:56 +0200 Subject: 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. --- indra/newview/gltf/primitive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/gltf/primitive.cpp') 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) { -- cgit v1.2.3