Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static HRESULT APIENTRY vboxWddmDDevCreateResource(....)
- {
- ....
- for (UINT i = 0; i < pResource->SurfCount; ++i)
- {
- ....
- if (SUCCEEDED(hr))
- {
- ....
- }
- else
- {
- for (UINT j = 0; i < j; ++j)
- {
- ....
- }
- break;
- }
- }
- ....
- }
- The error is probably in the "i < j" condition. I think the programmer actually wanted to write j < I.
- This suspicious code was found in VirtualBox project by PVS-Studio static code analyzer.
- Warning message is:
- V534 It is likely that a wrong variable is being compared inside the 'for' operator. Consider reviewing 'i'. vboxdispd3d.cpp 4470
- 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