Академический Документы
Профессиональный Документы
Культура Документы
1. V501 There are identical sub-expressions to the left and to the right of the '&&' operator. UT ox3dtabview.cpp 230
void COX3DTabViewContainer::OnNcPaint() { ... if(rectClient.top<rectClient.bottom && rectClient.top<rectClient.bottom) { dc.ExcludeClipRect(rectClient); } ... }
'&&'
V501 There are identical sub-expressions to the left and to the right of the '&&' operator. UT oxtabclientwnd.cpp 184
2.
V547 Expression 'lpDrawItemStruct -> itemID >= 0' is always true. Unsigned type value is always >= 0. UT oxautolistbox.cpp 56
void COXAutoListBox ::DrawItem(...) { ... if (lpDrawItemStruct ->itemID>=0) { ... } ... }
"lpDrawItemStruct->itemID>=0" :
, (V547).
itemID ,
UINT.
3.
V547 Expression 'lpms -> itemID < 0' is always false. Unsigned type value is never < 0. UT oxcoolcombobox.cpp 476
void COXCoolComboBox::MeasureItem(...) { if(lpms->itemID<0) lpms->itemHeight=m_nDefaultFontHeight+1; else lpms->itemHeight= m_nDefaultFontHeightSansLeading+1; }
"lpms, ,
4. V801 Decreased performance. It is better to redefine the first function argument as a reference. Consider replacing 'const .. mi' with 'const .. &mi'. UT oxdllmanager.h 123
BOOL operator==(const _tagMODULEINFO mi) const { return ((hModule==mi.hModul e)& (sModuleFileName.CompareNoCase(mi.sModuleFileName)==0)); }
V801 &mi".
5. V501 There are identical sub-expressions to the left and to the right of the '==' operator: dwDockStyle == dwDockStyle UT oxframewnddock.cpp 190
void COXFrameWndSizeDock::TileDockedBars( DWORD dwDockStyle) { ... if (pDock != NULL && (pDock->m_dwStyle && dwDockStyle == dwDockStyle)) ... }
"dwDockStyle == dwDockStyle"
6.
'char'
'unsigned char'
: V547 Expression 'chNewChar >= 128' is always false. The value range of signed char type: [-128, 127]. UT oxmaskededit.cpp 81 V547 Expression 'chNewChar <= 255' is always true. The value range of signed char type: [-128, 127]. UT oxmaskededit.cpp 81
BOOL CMaskData::IsValidInput(TCHAR chNewChar) { ... if((chNewChar >= 128) && (chNewChar <= 255)) bIsValidInput=TRUE ; ... }
, 128..127]. ,
chNewChar .
[ -
7. V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. UT oxprocess.h 583
inline COXProcessIterator& operator+(int nOffset) { if(nOffset>0) Next(nOffset); else if(nOffset>0) Prev(-nOffset); return *this; }
V517 .
"Prev(-nOffset);" :
: V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. UT oxprocess.h 596 V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. UT oxprocess.h 610 V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. UT oxprocess.h 624
8.
V547 Expression 'm_nCurrentIndex - nOffset < 0' is always false. Unsigned type value is never < 0. UT oxprocess.cpp 594
int m_nCurrentIndex; ... BOOL COXProcessIterator::Prev(UINT nOffset) { ... if(m_nCurrentIndex -nOffset<0) return FALSE; ... }
"m_nCurrentIndex-nOffset" 0.
unsigned,
9.
ASSERT()
V501 There are identical sub-expressions to the left and to the right of the '&&' operator. UT oxscrollwnd.cpp 645
void COXScrollWnd::OnPrepareDC(...)
:
ASSERT(m_totalDev.cx>=0 && m_totalDev.cy>=0);
: V501 There are identical sub-expressions to the left and to the right of the '&&' operator. UT oxzoomvw.cpp 179