PVS-StudioWarnings

PVS-Studio warning V517 for libwebpdecode

Nov 19th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. void VP8ReconstructBlock(VP8Decoder* const dec) {
  2.   ...
  3.   if (dec->non_zero_ & (1 << n)) {
  4.     VP8Transform(coeffs + n * 16, dst);
  5.   } else if (dec->non_zero_ & (1 << n)) {
  6.     VP8TransformDC(coeffs + n * 16, dst);
  7.   }
  8.   ...
  9. }
  10.  
  11. This suspicious code was found in libwebpdecode project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 353, 355. libwebp frame.c 353
  14.  
  15. 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