PVS-StudioWarnings

PVS-Studio warning V517 for ReactOS

Nov 19th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. BOOL WINAPI
  2. SetupDiGetClassDevPropertySheetsW(....)
  3. {
  4.   ...
  5.   else if (!PropertySheetHeader)               <<<---
  6.     SetLastError(ERROR_INVALID_PARAMETER);
  7.  
  8.   else if (PropertySheetHeader->dwFlags & PSH_PROPSHEETPAGE)
  9.     ...
  10.  
  11.   else if (!PropertySheetHeader)
  12.     SetLastError(ERROR_INVALID_PARAMETER);     <<<---
  13.   ...
  14. }
  15.  
  16. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 1190, 1198. setupapi devclass.c 1190
  19.  
  20. 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