PVS-StudioWarnings

PVS-Studio warning V640 for FFMpeg

Nov 12th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. static void vc1_interp_mc(VC1Context *v)
  2. {
  3.   ....
  4.   if (v->field_mode) {
  5.       if (v->cur_field_type != v->ref_field_type[1])
  6.           my   = my   - 2 + 4 * v->cur_field_type;
  7.           uvmy = uvmy - 2 + 4 * v->cur_field_type;
  8.   }
  9.   ....
  10. }
  11.  
  12. This suspicious code was found in FFMpeg 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. vc1dec.c 1917
  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