PVS-StudioWarnings

PVS-Studio warning V510 for Chromium

Nov 20th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. typedef std::wstring string16;
  2.  
  3. const base::string16& relaunch_flags() const {
  4.   return relaunch_flags_;
  5. }
  6.  
  7. int RelaunchChrome(const DelegateExecuteOperation& operation)
  8. {
  9.   AtlTrace("Relaunching [%ls] with flags [%s]\n",
  10.            operation.mutex().c_str(),
  11.            operation.relaunch_flags());     <<<<====
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V510 The 'AtlTrace' function is not expected to receive class-type variable as third actual argument. delegate_execute.cc 96
  18.  
  19. 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