Advertisement
PVS-StudioWarnings

PVS-Studio warning V517 for WebRTC

Nov 24th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. ACMGenericCodec* ACMCodecDB::CreateCodecInstance(....) {
  2.   ....
  3.   } else if (!STR_CASE_CMP(codec_inst->plname, "CN")) {
  4.     int codec_id;
  5.     switch (codec_inst->plfreq) {
  6.       ....
  7.   } else if ....
  8.   ....
  9.   } else if (!STR_CASE_CMP(codec_inst->plname, "CN")) {
  10.     int codec_id;
  11.     switch (codec_inst->plfreq) {
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in WebRTC project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 680, 735. acm_codec_database.cc 680
  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
Advertisement