Advertisement
PVS-StudioWarnings

PVS-Studio warning V517 for Scilab

Nov 26th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. int sci_xset( char *fname, unsigned long fname_len )
  2. {
  3.   ....
  4.   else if ( strcmp(cstk(l1), "mark size") == 0)
  5.   ....
  6.   else if ( strcmp(cstk(l1), "mark") == 0)
  7.   ....
  8.   ....
  9.   else if ( strcmp(cstk(l1), "mark") == 0)
  10.   ....
  11.   else if ( strcmp(cstk(l1), "colormap") == 0)
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in Scilab project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 175, 398. sci_xset.c 175
  18.  
  19. 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