PVS-StudioWarnings

PVS-Studio warning V605 for Virtualdub

Nov 12th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #define ICERR_CUSTOM -400L
  2.  
  3. static const char *GetVCMErrorString(uint32 icErr) {
  4.   ....
  5.   if (icErr <= ICERR_CUSTOM)
  6.     err = "A codec-specific error occurred.";
  7.   ....
  8. }
  9.  
  10. This suspicious code was found in Virtualdub project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V605 Consider verifying the expression: icErr <= - 400L. An unsigned value is compared to the number -400. system error_win32.cpp 54
  13.  
  14. 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