Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BCMenu *BCMenu::FindMenuOption(int nId,UINT& nLoc)
- {
- ...
- nLoc = -1;
- ...
- }
- BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,
- UINT nID, int nIconNormal)
- {
- UINT nLoc;
- ...
- BCMenu *psubmenu = FindMenuOption(nID,nLoc);
- ...
- if(psubmenu && nLoc>=0) mdata = psubmenu->m_MenuList[nLoc];
- ...
- }
- This suspicious code was found in BCMenu project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'nLoc >= 0' is always true. Unsigned type value is always >= 0. Merge bcmenu.cpp 1232
- 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