Skip to content

Commit b98755b

Browse files
authored
Merge pull request #47632 from smuzaffar/fix-used-uninitialized1
[GCC14] Fix may be used uninitialized warnings
2 parents 34dae92 + fcdcd13 commit b98755b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

SimG4Core/CustomPhysics/src/FullModelReactionDynamics.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,10 +2281,9 @@ G4double FullModelReactionDynamics::GenerateNBodyEvent(const G4double totalEnerg
22812281
wtmax = std::log(std::pow(kineticEnergy, vecLen - 2) * ffq[vecLen - 1] / totalE);
22822282
}
22832283
lzero = true;
2284-
G4double pd[50];
2284+
G4double pd[50] = {0.0};
22852285
//G4double *pd = new G4double [vecLen-1];
22862286
for (i = 0; i < vecLen - 1; ++i) {
2287-
pd[i] = 0.0;
22882287
if (emm[i + 1] * emm[i + 1] > 0.0) {
22892288
G4double arg = emm[i + 1] * emm[i + 1] +
22902289
(emm[i] * emm[i] - mass[i + 1] * mass[i + 1]) * (emm[i] * emm[i] - mass[i + 1] * mass[i + 1]) /

0 commit comments

Comments
 (0)