Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setPepMaxProb( bool use_nsp, bool use_fpkm,
- bool use_joint_probs, bool compute_spectrum_cnts )
- {
- double prob = 0.0;
- double max2 = 0.0;
- double max3 = 0.0;
- double max4 = 0.0;
- double max5 = 0.0;
- double max6 = 0.0;
- double max7 = 0.0;
- ....
- if ( pep3 ) { ... if ( use_joint_probs && prob > max3 ) ... }
- ....
- if ( pep4 ) { ... if ( use_joint_probs && prob > max4 ) ... }
- ....
- if ( pep5 ) { ... if ( use_joint_probs && prob > max5 ) ... }
- ....
- if ( pep6 ) { ... if ( use_joint_probs && prob > max6 ) ... }
- ....
- if ( pep7 ) { ... if ( use_joint_probs && prob > max6 ) ... }
- ....
- }
- This is what should have been written here: if ( pep7 ) { ... if ( use_joint_probs && prob > max7 ) ... }
- This suspicious code was found in TPP project by PVS-Studio static code analyzer.
- Warning message is:
- V525 The code containing the collection of similar blocks. Check items 'max3', 'max4', 'max5', 'max6', 'max6' in lines 4664, 4690, 4716, 4743, 4770. proteinprophet.cpp 4664
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment