Skip to content

Commit fcdcd13

Browse files
committed
[GCC14] Fix may be used uninitialized warnings
1 parent 8fd36f3 commit fcdcd13

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)