Advertisement
PVS-StudioWarnings

PVS-Studio warning V588 for TPP

Nov 27th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. int main(int argc, char **argv)
  2. {
  3.   ...
  4.   ii=0;
  5.   for (i=0; pEnvironment.szPeptide[i]!=0; i++)
  6.     ii =+ pEnvironment.szPeptide[i];
  7.   ...
  8. }
  9.  
  10. This is what should have been written here: ii += pEnvironment.szPeptide[i];
  11.  
  12. This suspicious code was found in TPP project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V588 The expression of the 'A =+ B' kind is utilized. Consider reviewing it, as it is possible that 'A += B' was meant. plot_msms plot-msms1.cxx 478
  15.  
  16. 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
Advertisement