PVS-Studio Analysis Results

Source code:WTL-git-eec6c3
Date:03/17/18 18:27:39
PVS-Studio Version:6.22.25373.921
Total Warnings (GA):61
Total Warnings (OP):9
Total Warnings (64):8
Group Location Level Code Message
64-bit errors atlapp.h:943 High V204 Explicit conversion from 32-bit integer type to pointer type.
64-bit errors atlapp.h:857 High V221 Suspicious sequence of types castings: pointer -> memsize -> 32-bit integer. The value being cast: 'this'.
64-bit errors atlctrlw.h:616 High V220 Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being cast: '(ULONG_PTR)(image.m_lpstr)'.
64-bit errors atlctrlw.h:617 High V220 Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being cast: '(ULONG_PTR)(image.m_lpstr)'.
64-bit errors atlctrlw.h:616 High V221 Suspicious sequence of types castings: pointer -> memsize -> 32-bit integer. The value being cast: '(image.m_lpstr)'.
64-bit errors atlctrlw.h:617 High V221 Suspicious sequence of types castings: pointer -> memsize -> 32-bit integer. The value being cast: '(image.m_lpstr)'.
64-bit errors atlgdi.h:1337 High V221 Suspicious sequence of types castings: pointer -> memsize -> 32-bit integer. The value being cast: '(::SelectObject(m_hDC, hRgn))'.
64-bit errors atlprint.h:240 Medium V119 More than one sizeof() operator is used in one expression.
General Analysis atlctrls.h:8019 High V547 Expression 'uDragListMessage == 0' is always true.
General Analysis atlctrlw.h:3076 High V547 Expression 'uGetBarMessage == 0' is always true.
General Analysis atlctrlw.h:3054 High V547 Expression 'uAutoPopupMessage == 0' is always true.
General Analysis atlctrlw.h:2419 High V1002 The 'CBrushT' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor.
General Analysis atlctrlw.h:2148 High V1002 The 'CBrushT' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor.
General Analysis atldlgs.h:761 High V781 The value of the 'nBytes' variable is checked after it was used. Perhaps there is a mistake in program logic. Check lines: 761, 762.
General Analysis atldlgs.h:2050 High V547 Expression 'uSetRGBMessage == 0' is always true.
General Analysis atldlgs.h:5084 High V547 Expression 'uGetExteriorPageTitleFont == 0' is always true.
General Analysis atldlgs.h:5106 High V547 Expression 'uGetBulletFont == 0' is always true.
General Analysis atldlgs.h:1839 High V773 Visibility scope of the 'hDC' handle was exited without releasing the resource. A resource leak is possible.
General Analysis atldlgs.h:2072 High V547 Expression 'uColorOKMessage == 0' is always true.
General Analysis atlframe.h:448 High V575 The number of processed elements should be passed to the 'GetClassNameW' function as the third argument instead of buffer's size in bytes.
General Analysis atlgdi.h:3253 High V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_header, m_pfd.
General Analysis atlmisc.h:470 High V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_fd, m_lpszRoot.
General Analysis atlprint.h:708 High V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_nCurPage.
General Analysis atlprint.h:418 High V575 The null pointer is passed into 'DocumentPropertiesW' function. Inspect the third argument.
General Analysis atlprint.h:412 High V575 The null pointer is passed into 'DocumentPropertiesW' function. Inspect the third argument.
General Analysis mainfrm.h:40 High V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_bMsgHandled.
General Analysis mainfrm.h:228 High V1002 The 'CMenuT' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor.
General Analysis mainfrm.h:227 High V1002 The 'CMenuT' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor.
General Analysis mainfrm.h:229 High V1002 The 'CMenuT' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor.
General Analysis mainfrm.h:257 High V1002 The 'CMenuT' class, containing pointers, constructor and destructor, is copied by the automatically generated copy constructor.
General Analysis atlctrlw.h:196 Medium V730 Not all members of a class are initialized inside the constructor. Consider inspecting: lpstrText, fType, fState, iButton.
General Analysis atlctrlw.h:2281 Medium V560 A part of conditional expression is always true: bDisabled.
General Analysis atldlgs.h:2322 Medium V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_pdActual.
General Analysis atlframe.h:561 Medium V530 The return value of function 'LoadStringW' is required to be utilized.
General Analysis atlframe.h:914 Medium V530 The return value of function 'LoadStringW' is required to be utilized.
General Analysis atlframe.h:1162 Medium V530 The return value of function 'LoadStringW' is required to be utilized.
General Analysis atlframe.h:1416 Medium V530 The return value of function 'LoadStringW' is required to be utilized.
General Analysis atlmisc.h:545 Medium V686 After evaluation of the left operand of the '||' operator , the right expression '(cchLength < 1)' is excessive, or the expression contains a logical error.
General Analysis atlprint.h:577 Medium V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_pInfo, m_pDefDevMode, m_docinfo, m_nStartPage, m_nEndPage.
General Analysis atlapp.h:459 Low V524 It is odd that the body of 'wvsprintf_x' function is fully equivalent to the body of 'vsprintf_x' function.
General Analysis atlapp.h:759 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlapp.h:844 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrls.h:8635 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrls.h:3916 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrls.h:2785 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrlw.h:972 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrlw.h:982 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrlw.h:1291 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrlw.h:1309 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlctrlw.h:3867 Low V537 Consider reviewing the correctness of 'cyHeight' item's usage.
General Analysis atlctrlw.h:3861 Low V537 Consider reviewing the correctness of 'cyHeight' item's usage.
General Analysis atlctrlw.h:182 Low V553 The length of 'CCommandBarCtrlImpl' class's declaration is more than 2000 lines long. You should consider refactoring the code.
General Analysis atldlgs.h:712 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlframe.h:2092 Low V526 The 'lstrcmpW' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
General Analysis atlframe.h:2097 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlframe.h:2446 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlgdi.h:3281 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlgdi.h:3269 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlgdi.h:290 Low V659 Declarations of functions with 'CreateDIBPatternBrush' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 280, 290.
General Analysis atlgdi.h:2353 Low V659 Declarations of functions with 'DrawTextW' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error. Check lines: 2346, 2353.
General Analysis atlprint.h:767 Low V522 There might be dereferencing of a potential null pointer 'pmh'.
General Analysis atlprint.h:798 Low V522 There might be dereferencing of a potential null pointer 'pmh'.
General Analysis atlprint.h:106 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atlprint.h:1078 Low V522 There might be dereferencing of a potential null pointer 'pmh'.
General Analysis atlscrl.h:1541 Low V550 An odd precise comparison: m_fZoomScale != fZoomScale. It's probably better to use a comparison with defined precision: fabs(A - B) > Epsilon.
General Analysis atluser.h:85 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atluser.h:64 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis atluser.h:1209 Low V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
General Analysis mainfrm.h:245 Low V522 There might be dereferencing of a potential null pointer 'pLoop'.
Micro-optimizations atlctrlw.h:1307 High V814 Decreased performance. The 'lstrlenW' function was called multiple times inside the body of a loop.
Micro-optimizations atlframe.h:2096 High V814 Decreased performance. The 'lstrlenW' function was called multiple times inside the body of a loop.
Micro-optimizations atlframe.h:3041 Medium V807 Decreased performance. Consider creating a reference to avoid using the 'm_arrData[i + j].m_rect' expression repeatedly.
Micro-optimizations mainfrm.h:492 Medium V805 Decreased performance. It is inefficient to identify an empty string by using 'lstrlenW(str) > 0' construct. A more efficient way is to check: str[0] != '\0'.
Micro-optimizations atlctrlw.h:3783 Low V807 Decreased performance. Consider creating a reference to avoid using the 'this->GetParent()' expression repeatedly.
Micro-optimizations atlctrlw.h:3722 Low V807 Decreased performance. Consider creating a reference to avoid using the 'this->GetParent()' expression repeatedly.
Micro-optimizations atlframe.h:2638 Low V807 Decreased performance. Consider creating a reference to avoid using the 'this->m_arrUIMap[i]' expression repeatedly.
Micro-optimizations atlscrl.h:1693 Low V821 Decreased performance. The 'sizeLines' variable can be constructed in a lower level scope.
Micro-optimizations props.h:84 Low V821 Decreased performance. The 'dc' variable can be constructed in a lower level scope.