Examples of errors detected by the V606 diagnostic.


V606. Ownerless token 'Foo'.


RunAsAdmin Explorer Shim

V606 Ownerless token 'false'. w3c.cpp 1806


bool AsyncW3Client::WaitCompleteRequest(unsigned long ntime)
{
  if (!_hCompleteRequestEvent ||
      _hCompleteRequestEvent==INVALID_HANDLE_VALUE)
    false;

  ....
}

Most likely this is what should be written here: "return false;".


Windows 8 Driver Samples

V606 Ownerless token 'false'. util.cpp 91


bool ParseNumber(....)
{
  ....
  if ((*Value < Bounds.first) ||
      (*Value > Bounds.second))
  {
    printf("Value %s is out of bounds\n", String.c_str());
    false;
  }
  ....
}

This is what should have been written here: "return false".

Similar errors can be found in some other places:

  • V606 Ownerless token 'false'. util.cpp 131

Oracle VM Virtual Box

V606 Ownerless token '0'. vboxmpvbva.cpp 997


VBOXCMDVBVA_HDR* VBoxCmdVbvaSubmitLock(....)
{
  if (VBoxVBVAExGetSize(&pVbva->Vbva) < cbCmd)
  {
    WARN(("...."));
    NULL;                                        // <=
  }

  if (!VBoxVBVAExBufferBeginUpdate(....)
  {
    WARN(("VBoxVBVAExBufferBeginUpdate failed!"));
    return NULL;
  }
  ....
}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
On our website we use a cookie to collect information of a technical nature.
If you do not agree, please leave the site. Learn More →
Do not show again