Charles Davis : include: Don' t accidentally redefine a member in struct _IRP (LLVM/Clang).

Alexandre Julliard julliard at winehq.org
Thu Feb 25 11:36:21 CST 2010


Module: wine
Branch: master
Commit: 5415b62fc2c65d736d4b723b326de8708ddf79b4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5415b62fc2c65d736d4b723b326de8708ddf79b4

Author: Charles Davis <cdavis at mymail.mines.edu>
Date:   Wed Feb 24 09:50:03 2010 -0700

include: Don't accidentally redefine a member in struct _IRP (LLVM/Clang).

---

 dlls/mountmgr.sys/device.c   |    2 +-
 dlls/mountmgr.sys/mountmgr.c |    2 +-
 dlls/ntoskrnl.exe/ntoskrnl.c |   12 ++++++------
 include/ddk/wdm.h            |    4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c
index d17f878..bf2bcee 100644
--- a/dlls/mountmgr.sys/device.c
+++ b/dlls/mountmgr.sys/device.c
@@ -858,7 +858,7 @@ NTSTATUS query_dos_device( int letter, enum device_type *type, char **device, ch
 /* handler for ioctls on the harddisk device */
 static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp )
 {
-    IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation;
+    IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u2.CurrentStackLocation;
     struct disk_device *dev = device->DeviceExtension;
 
     TRACE( "ioctl %x insize %u outsize %u\n",
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 7056ef4..c92e4a4 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -351,7 +351,7 @@ done:
 /* handler for ioctls on the mount manager device */
 static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
 {
-    IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation;
+    IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u2.CurrentStackLocation;
 
     TRACE( "ioctl %x insize %u outsize %u\n",
            irpsp->Parameters.DeviceIoControl.IoControlCode,
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index fcb7bea..0131d24 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -144,7 +144,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
     irp.AssociatedIrp.SystemBuffer = in_buff;
     irp.UserBuffer = out_buff;
     irp.MdlAddress = &mdl;
-    irp.Tail.Overlay.s.u.CurrentStackLocation = &irpsp;
+    irp.Tail.Overlay.s.u2.CurrentStackLocation = &irpsp;
     irp.UserIosb = NULL;
 
     irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL;
@@ -294,7 +294,7 @@ void WINAPI IoInitializeIrp( IRP *irp, USHORT size, CCHAR stack_size )
     InitializeListHead( &irp->ThreadListEntry );
     irp->StackCount = stack_size;
     irp->CurrentLocation = stack_size + 1;
-    irp->Tail.Overlay.s.u.CurrentStackLocation =
+    irp->Tail.Overlay.s.u2.CurrentStackLocation =
             (PIO_STACK_LOCATION)(irp + 1) + stack_size;
 }
 
@@ -434,7 +434,7 @@ PIRP WINAPI IoBuildDeviceIoControlRequest( ULONG IoControlCode,
     instance->irp = irp;
     list_add_tail( &Irps, &instance->entry );
 
-    irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation - 1;
+    irpsp = irp->Tail.Overlay.s.u2.CurrentStackLocation - 1;
     irpsp->MajorFunction = InternalDeviceIoControl ?
             IRP_MJ_INTERNAL_DEVICE_CONTROL : IRP_MJ_DEVICE_CONTROL;
     irpsp->Parameters.DeviceIoControl.IoControlCode = IoControlCode;
@@ -647,7 +647,7 @@ NTSTATUS WINAPI IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
     TRACE( "%p %p\n", device, irp );
 
     --irp->CurrentLocation;
-    irpsp = --irp->Tail.Overlay.s.u.CurrentStackLocation;
+    irpsp = --irp->Tail.Overlay.s.u2.CurrentStackLocation;
     dispatch = device->DriverObject->MajorFunction[irpsp->MajorFunction];
     status = dispatch( device, irp );
 
@@ -744,7 +744,7 @@ void WINAPI IofCompleteRequest( IRP *irp, UCHAR priority_boost )
     status = irp->IoStatus.u.Status;
     while (irp->CurrentLocation <= irp->StackCount)
     {
-        irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation;
+        irpsp = irp->Tail.Overlay.s.u2.CurrentStackLocation;
         routine = irpsp->CompletionRoutine;
         call_flag = 0;
         /* FIXME: add SL_INVOKE_ON_CANCEL support */
@@ -756,7 +756,7 @@ void WINAPI IofCompleteRequest( IRP *irp, UCHAR priority_boost )
                 call_flag = 1;
         }
         ++irp->CurrentLocation;
-        ++irp->Tail.Overlay.s.u.CurrentStackLocation;
+        ++irp->Tail.Overlay.s.u2.CurrentStackLocation;
         if (call_flag)
         {
             TRACE( "calling %p( %p, %p, %p )\n", routine,
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index a382294..72c6e85 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -423,7 +423,7 @@ typedef struct _IRP {
         struct {
           PVOID  DriverContext[4];
         } DUMMYSTRUCTNAME;
-      } DUMMYUNIONNAME;
+      } DUMMYUNIONNAME1;
       PETHREAD  Thread;
       PCHAR  AuxiliaryBuffer;
       struct {
@@ -431,7 +431,7 @@ typedef struct _IRP {
         union {
           struct _IO_STACK_LOCATION  *CurrentStackLocation;
           ULONG  PacketType;
-        } DUMMYUNIONNAME;
+        } DUMMYUNIONNAME2;
       } DUMMYSTRUCTNAME;
       struct _FILE_OBJECT  *OriginalFileObject;
     } Overlay;




More information about the wine-cvs mailing list