Advertisement
PVS-StudioWarnings

PVS-Studio warning V560 for NetDefender

Nov 27th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. SIZE CPPHtmlDrawer::DrawHtmlString (
  2.   CPPString & sHtml, LPCRECT lpRect)
  3. {
  4.   ....
  5.   nIdRes = 0;
  6.   nIdDll = 0;
  7.   while (nIndex < sProperties.GetLength())
  8.   {
  9.     ....
  10.     if (sParameter == _T("idres"))
  11.       nIdRes = GetLengthUnit(sValue, nIdRes);
  12.     else if (sParameter == _T("iddll"))
  13.       nIdRes = GetLengthUnit(sValue, nIdDll);
  14.     ....
  15.   }
  16.   if (nIdRes || nIdDll)
  17.   ....
  18. }
  19.  
  20. Most likely this is what should be written here: nIdDll = GetLengthUnit(sValue, nIdDll);
  21.  
  22. This suspicious code was found in NetDefender project by PVS-Studio static code analyzer.
  23. Warning message is:
  24. V560 A part of conditional expression is always false: nIdDll. pphtmldrawer.cpp 2723
  25.  
  26. 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