[PATCH 3/4] include: Define IoSkipCurrentIrpStackLocation

Sebastian Lackner sebastian at fds-team.de
Wed Oct 12 10:15:53 CDT 2016


On 12.10.2016 16:57, Aric Stewart wrote:
> 
> True, the wdm.h I looked at in the ddk did not appear to block the
> two statements together so your statement would not work on windows
> either. I was adding them to look like the other statements in our
> header.
> 
> Now I have not opposition to putting them in a block, but just saying
> that it is not done that way in the windows header.

I assume you are looking at an old version then, and Microsoft fixed
this mistake in the meantime. Windows 10 header files contain for example:

--- snip ---
FORCEINLINE
VOID
IoSkipCurrentIrpStackLocation (
    _Inout_ PIRP Irp
)
[...]
{
    NT_ASSERT(Irp->CurrentLocation <= Irp->StackCount);
    Irp->CurrentLocation++;
    Irp->Tail.Overlay.CurrentStackLocation++;
}
--- snip ---

Nevertheless, I think both "{...}" and using an inline function is fine
in this case.

> 
> Yeah, i just missed the other 2 locations. But I should update them
> with the correct bracketing.
> 
> The rest of the code seems to use (...) but do you feel like it
> should be {..}?

No, it also wouldn't compile if you replace it with {...} there because
the result is usually assigned to a variable. Those definitions look
fine to me and are not affected by this problem.

> 
> -aric




More information about the wine-devel mailing list