PVS-StudioWarnings

PVS-Studio warning V614 for FFMpeg

Nov 20th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. static int pack_bitstream(G723_1_Context *p,
  2.   unsigned char *frame, int size)
  3. {
  4.   ....
  5.   int info_bits;
  6.   ....
  7.   if (p->cur_rate == RATE_6300) {
  8.     info_bits = 0;
  9.     put_bits(&pb, 2, info_bits);
  10.   }
  11.   ....
  12.   return frame_size[info_bits];
  13. }
  14.  
  15. This suspicious code was found in FFMpeg project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V614 Potentially uninitialized variable 'info_bits' used. g723_1.c 2335
  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