Advertisement
PVS-StudioWarnings

PVS-Studio warning V576 for FlightGear

Nov 10th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. unsigned int getPort() const ;
  2.  
  3. void
  4. UGTelnet::handleAccept()
  5. {
  6.   ....
  7.   printf("Telent server accepted connection from %s:%d\n",
  8.          addr.getHost(), addr.getPort() );
  9.   ....
  10. }
  11.  
  12. This suspicious code was found in FlightGear project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V576 Incorrect format. Consider checking the third actual argument of the 'printf' function. The SIGNED integer type argument is expected. ugear_telnet.cxx 230
  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
Advertisement