PVS-StudioWarnings

PVS-Studio warning V640 for WebKit

Nov 17th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. void FrameView::adjustMediaTypeForPrinting(bool printing)
  2. {
  3.   ....
  4.   if (printing) {
  5.     if (m_mediaTypeWhenNotPrinting.isNull())
  6.       m_mediaTypeWhenNotPrinting = mediaType();
  7.       setMediaType("print");
  8.   } else {
  9.   ....
  10. }
  11.  
  12. This suspicious code was found in WebKit project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V640 The code's operational logic does not correspond with its formatting. The statement is indented to the right, but it is always executed. It is possible that curly brackets are missing. frameview.cpp 1216
  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