Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam,
- LPARAM lParam )
- {
- ...
- DrawState(dis->hDC,NULL,NULL,(LPARAM)hIcon,0,
- dis->rcItem.right+dis->rcItem.left-
- GetSystemMetrics(SM_CXSMICON))/2+dx,
- (dis->rcItem.bottom+dis->rcItem.top-
- GetSystemMetrics(SM_CYSMICON))/2+dx,
- 0,0,
- DST_ICON|
- (dis->itemState&ODS_INACTIVE&&FALSE?
- DSS_DISABLED:DSS_NORMAL));
- ...
- }
- There are some conditions which are always true or wrong. Most likely this was made on purpose (to disable some code branches), but in some fragments it looks strange. You may easily forget of fragments like this, for instance. By the way, this code is formatted. It's just one string in the program. How are you going to find this FALSE later?..
- This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
- Warning message is:
- V560 A part of conditional expression is always false: 0. clist_modern modern_clui.cpp 2979
- 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