PVS-StudioWarnings

PVS-Studio warning V640 for Chromium

Nov 10th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. void OnTraceNotification(int notification) {
  2.   if (notification & TraceLog::EVENT_WATCH_NOTIFICATION)
  3.     ++event_watch_notification_;
  4.     notifications_received_ |= notification;
  5. }
  6.  
  7. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  8. Warning message is:
  9. 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. trace_event_unittest.cc 57
  10.  
  11. 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