PVS-StudioWarnings

PVS-Studio warning V517 for ReactOS

Nov 19th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. ULONG
  2. MMixerGetControlTypeFromTopologyNode(IN LPGUID NodeType)
  3. {
  4.   ...
  5.   else if (IsEqualGUIDAligned(NodeType,
  6.                               (LPGUID)&KSNODETYPE_MUX))
  7.   {
  8.     /* mux control */
  9.     return MIXERCONTROL_CONTROLTYPE_MUX;
  10.   }
  11.   else if (IsEqualGUIDAligned(NodeType,
  12.                               (LPGUID)&KSNODETYPE_MUX))
  13.   {
  14.     /* mux control */
  15.     return MIXERCONTROL_CONTROLTYPE_MUX;
  16.   }
  17.   ...
  18. }
  19.  
  20. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  21. Warning message is:
  22. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 177, 182. mmixer filter.c 177
  23.  
  24. 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