This is warning C4055.
'conversion': from data pointer 'type1' to function pointer 'type2'
The data pointer is mapped (possibly incorrectly) to the function pointer.
This is a level 1 warning under / Za and a level 4 warning in the / Ze section.
How do we resolve this warning? (In the right way, not a trick)
Edit:
There is a warning in this code snippet.
typedef NTSTATUS (*t_ObRegisterCallbacks)
(
IN POB_CALLBACK_REGISTRATION CallBackRegistration,
OUT PVOID *RegistrationHandle
);
t_ObRegisterCallbacks g_ObRegisterCallbacks = NULL;
void foo()
{
g_ObRegisterCallbacks = (t_ObRegisterCallbacks)MmGetSystemRoutineAddress(®Name);
}
source
share