Build usetup and ntoskrnl and winmm in gcc 4.0
Modified: trunk/reactos/lib/mmdrv/wave.c
Modified: trunk/reactos/ntoskrnl/ob/object.c
Modified: trunk/reactos/subsys/system/usetup/cabinet.c

Modified: trunk/reactos/lib/mmdrv/wave.c
--- trunk/reactos/lib/mmdrv/wave.c	2005-05-25 09:14:29 UTC (rev 15493)
+++ trunk/reactos/lib/mmdrv/wave.c	2005-05-25 13:07:27 UTC (rev 15494)
@@ -275,7 +275,7 @@
         case WODM_GETVOLUME:
             DPRINT("WODM_GETVOLUME");
             {
-                WAVE_DD_VOLUME Vol;
+                WAVE_DD_VOLUME Vol = {};
                 DWORD res;
 
                 res = soundGetData(WaveOutDevice, dwId, sizeof(Vol),

Modified: trunk/reactos/ntoskrnl/ob/object.c
--- trunk/reactos/ntoskrnl/ob/object.c	2005-05-25 09:14:29 UTC (rev 15493)
+++ trunk/reactos/ntoskrnl/ob/object.c	2005-05-25 13:07:27 UTC (rev 15494)
@@ -31,7 +31,7 @@
                      IN KPROCESSOR_MODE AccessMode)
 {
     NTSTATUS Status = STATUS_SUCCESS;
-    UNICODE_STRING LocalName;
+    UNICODE_STRING LocalName = {}; /* <= GCC 4.0 + Optimizer */
     
     /* First Probe the String */
     DPRINT("ObpCaptureObjectName: %wZ\n", ObjectName);

Modified: trunk/reactos/subsys/system/usetup/cabinet.c
--- trunk/reactos/subsys/system/usetup/cabinet.c	2005-05-25 09:14:29 UTC (rev 15493)
+++ trunk/reactos/subsys/system/usetup/cabinet.c	2005-05-25 13:07:27 UTC (rev 15494)
@@ -599,7 +599,7 @@
           wcscpy(CabinetPrev, CabinetName);
           RemoveFileName(CabinetPrev);
           CabinetNormalizePath(CabinetPrev, 256);
-		  RtlInitAnsiString( &astring, Buffer );
+		  RtlInitAnsiString( &astring, (LPSTR)Buffer );
 		  ustring.Length = wcslen( CabinetPrev );
 		  ustring.Buffer = CabinetPrev + ustring.Length;
 		  ustring.MaximumLength = sizeof( CabinetPrev ) - ustring.Length;
@@ -607,7 +607,7 @@
 		  Buffer += astring.Length + 1;
 
           /* Read label of prev disk */
-		  RtlInitAnsiString( &astring, Buffer );
+		  RtlInitAnsiString( &astring, (LPSTR)Buffer );
 		  ustring.Length = 0;
 		  ustring.Buffer = DiskPrev;
 		  ustring.MaximumLength = sizeof( DiskPrev );
@@ -626,7 +626,7 @@
           wcscpy(CabinetNext, CabinetName);
           RemoveFileName(CabinetNext);
           CabinetNormalizePath(CabinetNext, 256);
-		  RtlInitAnsiString( &astring, Buffer );
+		  RtlInitAnsiString( &astring, (LPSTR)Buffer );
 		  ustring.Length = wcslen( CabinetNext );
 		  ustring.Buffer = CabinetNext + ustring.Length;
 		  ustring.MaximumLength = sizeof( CabinetNext ) - ustring.Length;
@@ -634,7 +634,7 @@
 		  Buffer += astring.Length + 1;
 
           /* Read label of next disk */
-		  RtlInitAnsiString( &astring, Buffer );
+		  RtlInitAnsiString( &astring, (LPSTR)Buffer );
 		  ustring.Length = 0;
 		  ustring.Buffer = DiskNext;
 		  ustring.MaximumLength = sizeof( DiskNext );
@@ -999,7 +999,7 @@
 	  CFData = (PCFDATA)((char *)(CFData+1) + DataReserved + CFData->CompSize);
 	}
   // now decompress and discard any data in the block before the start of the file
-  CurrentBuffer = ((char *)(CFData+1)) + DataReserved; // start of comp data
+  CurrentBuffer = ((unsigned char *)(CFData+1)) + DataReserved; // start of comp data
   RemainingBlock = CFData->CompSize;
   InputLength = RemainingBlock;
   while( CurrentOffset < Search->File->FileOffset )
@@ -1047,7 +1047,7 @@
 		  DPRINT( "Out of block data\n" );
 		  CFData = (PCFDATA)CurrentBuffer;
 		  RemainingBlock = CFData->CompSize;
-		  CurrentBuffer = ((char *)(CFData+1) + DataReserved);
+		  CurrentBuffer = ((unsigned char *)(CFData+1) + DataReserved);
 		  InputLength = RemainingBlock;
 		}
 	}