| Summary: | Expression is always true. Probably the '&&' operator should be used here. g4collisionmesonbaryonelastic.cc 53 | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | a.ramazani |
| Component: | processes/hadronic/models/im_r_matrix | Assignee: | Gunter.Folger |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | a.ramazani |
| Priority: | P5 | ||
| Version: | 9.6 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
Fixed in development version. Need to validate effect of this fix. Thanks for reporting this clear bug. Bug fixed in development version; effect need to be validated. |
Expression is always true. Probably the '&&' operator should be used here. g4collisionmesonbaryonelastic.cc 53 Error: if( (GetNumberOfPartons(p1) != 2 || GetNumberOfPartons(p2) != 3) ||(GetNumberOfPartons(p1) != 3 || GetNumberOfPartons(p2) != 2) ) Correct: if( ( GetNumberOfPartons(p1) != 2 && GetNumberOfPartons(p1) != 3 ) ||( GetNumberOfPartons(p2) != 2 && GetNumberOfPartons(p2) != 3 ) ) http://files.viva64.com/beta/PVS-Studio_setup.exe i used The Best C++ static code analysis Tools "PVS-Studio 4.77" under for VS 2012 to analyse the Geant4.9.6 code there is many warnings and performace optimization so i recommend using PVS-Studio please correct me if i am wrong Thanks in Advance.