PVS-StudioWarnings

PVS-Studio warning V576 for Doom3

Nov 18th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. struct gameVersion_s {
  2.   gameVersion_s( void )
  3.   {
  4.     sprintf(string, "%s.%d%s %s %s",
  5.             ENGINE_VERSION, BUILD_NUMBER, BUILD_DEBUG,
  6.             BUILD_STRING, __DATE__, __TIME__ );
  7.   }
  8.   char string[256];
  9. } gameVersion;
  10.  
  11. This suspicious code was found in Doom3 project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V576 Incorrect format. A different number of actual arguments is expected while calling 'sprintf' function. Expected: 7. Present: 8. Game syscvar.cpp 54
  14.  
  15. 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