> > > > > + PHYSICAL_ADDRESS *phys; > > > + size_t size; > > > + NTSTATUS status; > > > + > [snip] > > > + > > > + status = WdfRequestRetrieveOutputBuffer( > > > + request, sizeof(*phys), &phys, &size); > > > > Better to put a (PVOID *)typecast for &phys here: > > status = WdfRequestRetrieveOutputBuffer( > > request, sizeof(*phys), (PVOID *)&phys, &size); > > What do you mean? Without a typecast the built-in static analyzer emits a > warning (and all warnings are treated as errors for a driver): > > virt2phys.c(108,46): error C2220: the following warning is treated as an error > virt2phys.c(108,46): warning C4047: 'function': 'PVOID *' differs in levels > of indirection from 'PVOID **' > virt2phys.c(108,46): warning C4022: 'WdfRequestRetrieveInputBuffer': pointer > mismatch for actual parameter 3 >
Never mind, I thought you were referring to the existing typecast in WdfRequestRetrieveInputBuffer(). Thanks for the suggestion, will add in v2. -- Dmitry Kozlyuk