Examples of errors detected by the V604 diagnostic
V604. Number of iterations in loop equals size of a pointer. Consider inspecting the expression.
Windows 8 Driver Samples
V604 It is odd that the number of iterations in the loop equals to the size of the 'szBuff' pointer. hclient.c 1688
VOID
ReportToString(
PHID_DATA pData,
_Inout_updates_bytes_(iBuffSize) LPSTR szBuff,
UINT iBuffSize
)
{
....
if(FAILED(StringCbPrintf (szBuff,
iBuffSize,
"Usage Page: 0x%x, Usages: ",
pData -> UsagePage)))
{
for(j=0; j<sizeof(szBuff); j++)
{
szBuff[j] = '\0';
}
return;
}
....
}
Most likely this is what should be written here: for(j=0; j<iBuffSize; j++)