cmssw
cmssw copied to clipboard
AMPTInterface: Fix used uninitialized warnings
Fixes https://github.com/cms-sw/cmssw/issues/44913
Fixes used uninitialized variable
warnings reported by enabling -O3
GEANT4 IBs and GCC13 #44913)
src/GeneratorInterface/AMPTInterface/src/hipyset1.35.f:11352:72:
11352 | ETARE=ETARE-3.*EJ*VJ*(FXYRE-0.25*F1RE)
| ^
Warning: 'vj' may be used uninitialized [-Wmaybe-uninitialized]
src/GeneratorInterface/AMPTInterface/src/hipyset1.35.f:11297:14:
11297 | VJ=AJ-4.*EJ*XW
| ^
note: 'vj' was declared here
src/GeneratorInterface/AMPTInterface/src/hipyset1.35.f:11276:72:
11276 | ETARE=ETARE+0.5*3.*EJ**2*EPS*(1.+(EPS-1.)*PHIRE)
| ^
Warning: 'ej' may be used uninitialized [-Wmaybe-uninitialized]
src/GeneratorInterface/AMPTInterface/src/hipyset1.35.f:11253:14:
11253 | EJ=KCHG(J,1)/3.
| ^
note: 'ej' was declared here