Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef UINT_PTR WPARAM;
- static int id2pos(int id)
- {
- int i;
- if (FramesSysNotStarted) return -1;
- for (i=0;i<nFramescount;i++)
- {
- if (Frames[i].id==id) return(i);
- }
- return(-1);
- }
- INT_PTR CLUIFrameSetFloat(WPARAM wParam,LPARAM lParam)
- {
- ...
- wParam=id2pos(wParam);
- if(wParam>=0&&(int)wParam<nFramescount)
- if (Frames[wParam].floating)
- ...
- }
- This suspicious code was found in Miranda IM project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'wParam >= 0' is always true. Unsigned type value is always >= 0. clist_mw cluiframes.c 3140
- 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