PVS-StudioWarnings

PVS-Studio warning V523 for IPP Samples

Nov 12th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. AACStatus aacencGetFrame(....)
  2. {
  3.   ...
  4.   if (maxEn[0] > maxEn[1]) {
  5.     ics[1].num_window_groups = ics[0].num_window_groups;
  6.     for (g = 0; g < ics[0].num_window_groups; g++) {
  7.       ics[1].len_window_group[g] = ics[0].len_window_group[g];
  8.     }
  9.   } else {
  10.     ics[1].num_window_groups = ics[0].num_window_groups;
  11.     for (g = 0; g < ics[0].num_window_groups; g++) {
  12.       ics[1].len_window_group[g] = ics[0].len_window_group[g];
  13.     }
  14.   }
  15.   ...
  16. }
  17.  
  18. This suspicious code was found in IPP Samples project by PVS-Studio static code analyzer.
  19. Warning message is:
  20. V523 The 'then' statement is equivalent to the 'else' statement. aac_enc aac_enc_api_fp.c 1379
  21.  
  22. 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