PVS-StudioWarnings

PVS-Studio warning V576 for javascriptcore

Nov 19th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. void CodeBlock::printStructure(
  2.   const char* name, const Instruction* vPC, int operand) const
  3. {
  4.   unsigned instructionOffset = vPC - m_instructions.begin();
  5.   printf("  [%4d] %s: %s\n", instructionOffset, name,
  6.     pointerToSourceString(vPC[operand].u.structure).
  7.       UTF8String().c_str());
  8. }
  9.  
  10. This suspicious code was found in javascriptcore project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V576 Incorrect format. Consider checking the second actual argument of the 'printf' function. The SIGNED integer type argument is expected. codeblock.cpp 280
  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