Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The argument is being passed to a function that expects a pointer to an object (not a pointer to a pointer)
This warning is reported when a pointer to a pointer is used in a call to a function that is expecting a pointer to an object.
The function takes a PVOID
in this position. Usually, it indicates that &pXXX
was used when pXXX
is required.
Some polymorphic functions (functions that can evaluate to, and be applied to, values of different types) are implemented in C by using a PVOID
argument that takes any pointer type. However, this allows the programmer to code a pointer to a pointer without causing a compiler error, even when this type isn't appropriate.
Example
The following code example generates this warning:
PFAST_MUTEX pFm;
//...
KeWaitForSingleObject(&pFm, UserRequest, UserMode, false, NULL);
The following code example avoids the warning:
PFAST_MUTEX pFm;
//...
KeWaitForSingleObject(pFm, UserRequest, UserMode, false, NULL);