You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to work through some suppressed compiler warnings in one of our code bases. Many of the suppressed warnings are C4312. This warning is saying that if a signed integer is cast upwards into a pointer type it may become unsafe if the original value was negative. The cast will fill in the upper bits with ones, which would change the pointer to some address in the kernel address space.
This new helper aims to help with that by casting upwards with 0s as the upper bits. That will avoid changing the value to something unsafe if it really is treated as a pointer.