PVS-StudioWarnings

PVS-Studio warning V532 for DeSmuME

Nov 10th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void splitpath(const char* path, char* drv, char* dir,
  2.                char* name, char* ext)
  3. {
  4.   ...
  5.   for(s=p; s<end; )
  6.     *s++;
  7.   ...
  8. }
  9.  
  10. Meaningless code. Currently it is equivalent to s = end.
  11.  
  12. This suspicious code was found in DeSmuME project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. DeSmuME_VS2005 xstring.cpp 479
  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