[Scummvm-git-logs] scummvm master -> 0be224bd5b949ee37ba3d68b3d04eec9c801b272
digitall
noreply at scummvm.org
Tue Feb 21 00:46:55 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0be224bd5b HPL1: Fix Maybe Uninitialized Variable GCC Compiler Warning
Commit: 0be224bd5b949ee37ba3d68b3d04eec9c801b272
https://github.com/scummvm/scummvm/commit/0be224bd5b949ee37ba3d68b3d04eec9c801b272
Author: D G Turner (digitall at scummvm.org)
Date: 2023-02-21T00:46:17Z
Commit Message:
HPL1: Fix Maybe Uninitialized Variable GCC Compiler Warning
Changed paths:
engines/hpl1/engine/libraries/newton/physics/dgCollisionConvex.cpp
engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgCollisionConvex.cpp b/engines/hpl1/engine/libraries/newton/physics/dgCollisionConvex.cpp
index b731c8c6301..ccd51ee4e89 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgCollisionConvex.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgCollisionConvex.cpp
@@ -999,6 +999,7 @@ dgInt32 dgCollisionConvex::SimplifyClipPolygon(dgInt32 count,
const dgVector &normal, dgVector *const polygon) const {
dgInt8 mark[DG_MAX_VERTEX_CLIP_FACE * 8];
dgInt8 buffer[8 * DG_MAX_VERTEX_CLIP_FACE * (sizeof(dgInt32) + sizeof(dgFloat32))];
+ for (uint i = 0; i < ARRAYSIZE(buffer); i++) buffer[i] = 0;
NEWTON_ASSERT(count < dgInt32(sizeof(mark) / sizeof(mark[0])));
dgUpHeap<dgInt32, dgFloat32> sortHeap(buffer, sizeof(buffer));
diff --git a/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp b/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
index a9367d48638..407cf5eb125 100644
--- a/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
+++ b/engines/hpl1/engine/libraries/newton/physics/dgMinkowskiConv.cpp
@@ -490,6 +490,7 @@ class dgContactSolver {
// dgPerimenterEdge* ptr;
// dgPerimenterEdge* ptr0;
dgInt32 buffer[256];
+ for (uint i = 0; i < ARRAYSIZE(buffer); i++) buffer[i] = 0;
dgUpHeap<dgPerimenterEdge *, dgFloat32> heap(buffer, sizeof(buffer));
dgInt32 restart = 1;
More information about the Scummvm-git-logs
mailing list