I've tested the PVS-Studio 4.0 analyzer with some of the projects from sourceforge.net.
I found a suspicious piece of code:
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
// Refer to the tutorial for an example of OnFileOpen
// Refer to the tutorial for an example of OnFileSave
// Refer to the tutorial for an example of OnFileSaveAs
V525 The code containing the collection of similar blocks. Check items 'OnFileOpen', 'OnFileSave', 'OnFileSave', 'OnFilePrint' in lines 37, 41, 45, 48. Frame mainfrm.cpp 37
Perhaps there should be written "case IDM_FILE_SAVEAS: OnFileSaveAs()"?
Actually I'm happy with the code the way it is.
The comments included with the code should make it quite clear what is intended here.
Log in to post a comment.