[ros-diffs] [cwittich] 25316: * fixed some warnings

cwittich at svn.reactos.org cwittich at svn.reactos.org
Fri Jan 5 21:22:54 CET 2007


Author: cwittich
Date: Fri Jan  5 23:22:44 2007
New Revision: 25316

URL: http://svn.reactos.org/svn/reactos?rev=25316&view=rev
Log:
* fixed some warnings

Modified:
    trunk/reactos/base/services/dhcp/adapter.c
    trunk/reactos/base/services/eventlog/file.c
    trunk/reactos/base/setup/welcome/welcome.c
    trunk/reactos/base/shell/cmd/batch.c
    trunk/reactos/base/system/expand/expand.rbuild
    trunk/reactos/base/system/msiexec/msiexec.c
    trunk/reactos/base/system/services/database.c
    trunk/reactos/base/system/services/driver.c
    trunk/reactos/base/system/services/groupdb.c
    trunk/reactos/base/system/services/rpcserver.c
    trunk/reactos/base/system/userinit/userinit.c

Modified: trunk/reactos/base/services/dhcp/adapter.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/dhcp/adapter.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/services/dhcp/adapter.c (original)
+++ trunk/reactos/base/services/dhcp/adapter.c Fri Jan  5 23:22:44 2007
@@ -31,7 +31,7 @@
     DH_DbgPrint(MID_TRACE,("AppendLen: %d, CharTotal: %d\n",
                            AppendLen, CharTotal));
 
-    Out = malloc( CharTotal );
+    Out = (CHAR**) malloc( CharTotal );
     OutKeyName = ((PCHAR)&Out[MaxSubKeys+1]);
 
     if( !Out ) { RegCloseKey( MainKey ); return NULL; }
@@ -73,7 +73,7 @@
 
     DH_DbgPrint(MID_TRACE,("Value %s has size %d\n", Value, SubOutLen));
 
-    if( !(SubOut = malloc(SubOutLen)) )
+    if( !(SubOut = (CHAR*) malloc(SubOutLen)) )
         goto regerror;
 
     if( (Error = RegQueryValueEx( ValueKey, Value, NULL, NULL,
@@ -128,7 +128,7 @@
             RootDevice &&
             !strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
             TargetKeyName =
-                malloc( strlen( TargetKeyNameStart ) +
+                (CHAR*) malloc( strlen( TargetKeyNameStart ) +
                         strlen( RootDevice ) +
                         strlen( TargetKeyNameEnd ) + 1 );
             if( !TargetKeyName ) goto cleanup;
@@ -219,7 +219,7 @@
  */
 
 void AdapterInit() {
-    PMIB_IFTABLE Table = malloc(sizeof(MIB_IFTABLE));
+    PMIB_IFTABLE Table = (PMIB_IFTABLE) malloc(sizeof(MIB_IFTABLE));
     DWORD Error, Size, i;
     PDHCP_ADAPTER Adapter = NULL;
 
@@ -233,7 +233,7 @@
            ERROR_INSUFFICIENT_BUFFER ) {
         DH_DbgPrint(MID_TRACE,("Error %d, New Buffer Size: %d\n", Error, Size));
         free( Table );
-        Table = malloc( Size );
+        Table = (PMIB_IFTABLE) malloc( Size );
     }
 
     if( Error != NO_ERROR ) goto term;
@@ -243,7 +243,7 @@
     for( i = 0; i < Table->dwNumEntries; i++ ) {
         DH_DbgPrint(MID_TRACE,("Getting adapter %d attributes\n",
                                Table->table[i].dwIndex));
-        Adapter = calloc( sizeof( DHCP_ADAPTER ) + Table->table[i].dwMtu, 1 );
+        Adapter = (DHCP_ADAPTER*) calloc( sizeof( DHCP_ADAPTER ) + Table->table[i].dwMtu, 1 );
 
         if( Adapter && Table->table[i].dwType == MIB_IF_TYPE_ETHERNET ) {
             memcpy( &Adapter->IfMib, &Table->table[i],
@@ -258,9 +258,9 @@
                    Adapter->IfMib.dwPhysAddrLen);
             Adapter->DhclientInfo.hw_address.hlen  =
                 Adapter->IfMib.dwPhysAddrLen;
-            /* I'm not sure where else to set this, but 
+            /* I'm not sure where else to set this, but
                some DHCP servers won't take a zero.
-               We checked the hardware type earlier in 
+               We checked the hardware type earlier in
                the if statement. */
             Adapter->DhclientInfo.hw_address.htype  =
                 HTYPE_ETHER;

Modified: trunk/reactos/base/services/eventlog/file.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/file.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/services/eventlog/file.c (original)
+++ trunk/reactos/base/services/eventlog/file.c Fri Jan  5 23:22:44 2007
@@ -3,9 +3,9 @@
  * LICENSE:          GPL - See COPYING in the top level directory
  * FILE:             services/eventlog/file.c
  * PURPOSE:          Event logging service
- * COPYRIGHT:        Copyright 2005 Saveliy Tretiakov           
+ * COPYRIGHT:        Copyright 2005 Saveliy Tretiakov
  */
- 
+
 #include "eventlog.h"
 
 PLOGFILE LogListHead = NULL;
@@ -16,11 +16,11 @@
 {
     DWORD dwWritten;
 	EOF_RECORD EofRec;
-    
+
     ZeroMemory(&LogFile->Header, sizeof(FILE_HEADER));
 	SetFilePointer(LogFile->hFile, 0, NULL, FILE_BEGIN);
 	SetEndOfFile(LogFile->hFile);
-	
+
 	LogFile->Header.SizeOfHeader = sizeof(FILE_HEADER);
 	LogFile->Header.SizeOfHeader2 = sizeof(FILE_HEADER);
 	LogFile->Header.FirstRecordOffset = sizeof(FILE_HEADER);
@@ -51,22 +51,22 @@
 	EofRec.StartOffset = LogFile->Header.FirstRecordOffset;
 	EofRec.EndOffset = LogFile->Header.EofOffset;
 
-	if(!WriteFile(LogFile->hFile, 
-		&EofRec, 
-		sizeof(EOF_RECORD), 
-		&dwWritten, 
+	if(!WriteFile(LogFile->hFile,
+		&EofRec,
+		sizeof(EOF_RECORD),
+		&dwWritten,
 		NULL))
 	{
 		DPRINT1("WriteFile failed:%d!\n", GetLastError());
 		return FALSE;
 	}
-		
+
 	if(!FlushFileBuffers(LogFile->hFile))
 	{
 		DPRINT1("FlushFileBuffers failed:%d!\n", GetLastError());
 		return FALSE;
 	}
-      
+
     return TRUE;
 }
 
@@ -84,32 +84,32 @@
 		DPRINT1("SetFilePointer failed! %d\n", GetLastError());
 		return FALSE;
 	}
-	
-	if(!ReadFile(LogFile->hFile, 
-             &LogFile->Header, 
-             sizeof(FILE_HEADER), 
+
+	if(!ReadFile(LogFile->hFile,
+             &LogFile->Header,
+             sizeof(FILE_HEADER),
              &dwRead, NULL))
     {
     	DPRINT1("ReadFile failed! %d\n", GetLastError());
     	return FALSE;
     }
-             
+
 	if(dwRead != sizeof(FILE_HEADER))
 	{
 		DPRINT("EventLog: Invalid file %S.\n", LogFile->FileName);
 		return LogfInitializeNew(LogFile);
     }
-    
+
 	if(LogFile->Header.SizeOfHeader != sizeof(FILE_HEADER) ||
 		LogFile->Header.SizeOfHeader2 != sizeof(FILE_HEADER))
 	{
 		DPRINT("EventLog: Invalid header size in %S.\n", LogFile->FileName);
 		return LogfInitializeNew(LogFile);
     }
-    
+
     if(LogFile->Header.Signature != LOGFILE_SIGNATURE)
     {
-        DPRINT("EventLog: Invalid signature %x in %S.\n", 
+        DPRINT("EventLog: Invalid signature %x in %S.\n",
                LogFile->Header.Signature,
                LogFile->FileName);
         return LogfInitializeNew(LogFile);
@@ -117,7 +117,7 @@
 
 	if(LogFile->Header.EofOffset > GetFileSize(LogFile->hFile, NULL)+1)
 	{
-        DPRINT("EventLog: Invalid eof offset %x in %S.\n", 
+        DPRINT("EventLog: Invalid eof offset %x in %S.\n",
                LogFile->Header.EofOffset,
                LogFile->FileName);
         return LogfInitializeNew(LogFile);
@@ -125,21 +125,21 @@
 
 	for(;;)
 	{
-		dwFilePointer = SetFilePointer(LogFile->hFile, 
-									   0, 
-									   NULL, 
+		dwFilePointer = SetFilePointer(LogFile->hFile,
+									   0,
+									   NULL,
 									   FILE_CURRENT);
-		
+
 		if(dwFilePointer == INVALID_SET_FILE_POINTER)
 		{
 			DPRINT1("SetFilePointer failed! %d\n", GetLastError());
 			return FALSE;
 		}
 
-		if(!ReadFile(LogFile->hFile, 
-				 &dwRecSize, 
-				 sizeof(dwRecSize), 
-				 &dwRead, 
+		if(!ReadFile(LogFile->hFile,
+				 &dwRecSize,
+				 sizeof(dwRecSize),
+				 &dwRead,
 				 NULL))
 		{
 			DPRINT1("ReadFile failed! %d\n", GetLastError());
@@ -158,34 +158,34 @@
 			DPRINT1("ReadFile() failed! %d\n", GetLastError());
 			return FALSE;
 		}
-		
+
 		if(dwRead != sizeof(dwRecSize))
 			break;
-		
+
 		if(dwRecSign != LOGFILE_SIGNATURE ||
 		   dwRecSize + dwFilePointer > GetFileSize(LogFile->hFile, NULL)+1 ||
 		   dwRecSize < sizeof(EVENTLOGRECORD))
 		{
 			break;
 		}
-		
-		if(SetFilePointer(LogFile->hFile, 
-			-((LONG)sizeof(DWORD)*2), 
-			NULL, 
+
+		if(SetFilePointer(LogFile->hFile,
+			-((LONG)sizeof(DWORD)*2),
+			NULL,
 			FILE_CURRENT) == INVALID_SET_FILE_POINTER)
 		{
 			DPRINT1("SetFilePointer() failed! %d", GetLastError());
 			return FALSE;
 		}
-		
+
 		RecBuf = (PEVENTLOGRECORD) HeapAlloc(MyHeap, 0, dwRecSize);
-		
+
 		if(!RecBuf)
 		{
 			DPRINT1("Can't allocate heap!\n");
 			return FALSE;
 		}
-		
+
 		if(!ReadFile(LogFile->hFile,
 				 RecBuf,
 				 dwRecSize,
@@ -196,7 +196,7 @@
 			HeapFree(MyHeap, 0, RecBuf);
 			return FALSE;
 		}
-		
+
 		if(dwRead !=  dwRecSize)
 		{
 			HeapFree(MyHeap, 0, RecBuf);
@@ -206,7 +206,7 @@
 		pdwRecSize2 = (PDWORD)(((PBYTE)RecBuf)+dwRecSize-4);
 		if(*pdwRecSize2 != dwRecSize)
 		{
-			DPRINT1("Invalid size2 of record %d (%x) in %s\n", 
+			DPRINT1("Invalid size2 of record %d (%x) in %s\n",
 				dwRecordsNumber,
 				*pdwRecSize2,
 				LogFile->LogName);
@@ -215,7 +215,7 @@
 		}
 
 		dwRecordsNumber++;
-		
+
 		if(!LogfAddOffsetInformation(LogFile, RecBuf->RecordNumber, dwFilePointer))
 		{
 			DPRINT1("LogfAddOffsetInformation() failed!\n");
@@ -235,75 +235,75 @@
 		DPRINT1("SetFilePointer() failed! %d\n", GetLastError());
 		return FALSE;
 	}
-	
+
 	if(!WriteFile(LogFile->hFile,
 			  &LogFile->Header,
 			  sizeof(FILE_HEADER),
-			  &dwRead, 
+			  &dwRead,
 			  NULL))
 	{
 		DPRINT1("WriteFile failed! %d\n", GetLastError());
 		return FALSE;
 	}
-	
+
 	if(!FlushFileBuffers(LogFile->hFile))
 	{
 		DPRINT1("FlushFileBuffers failed! %d\n", GetLastError());
 		return FALSE;
 	}
-	
+
 	return TRUE;
 }
 
-PLOGFILE LogfCreate(WCHAR *LogName, 
+PLOGFILE LogfCreate(WCHAR *LogName,
                     WCHAR *FileName)
 {
     PLOGFILE LogFile;
 	BOOL bResult, bCreateNew = FALSE;
-    
-    LogFile = HeapAlloc(MyHeap, 
-                        HEAP_ZERO_MEMORY, 
+
+    LogFile = (LOGFILE*) HeapAlloc(MyHeap,
+                        HEAP_ZERO_MEMORY,
                         sizeof(LOGFILE));
     if(!LogFile)
     {
         DPRINT1("Can't allocate heap!\n");
         return NULL;
     }
-    
-    LogFile->hFile = CreateFile(FileName, 
-                                GENERIC_READ | GENERIC_WRITE, 
-                                FILE_SHARE_READ, 
-                                NULL, 
+
+    LogFile->hFile = CreateFile(FileName,
+                                GENERIC_READ | GENERIC_WRITE,
+                                FILE_SHARE_READ,
+                                NULL,
                                 OPEN_ALWAYS,
-                                FILE_ATTRIBUTE_NORMAL | 
+                                FILE_ATTRIBUTE_NORMAL |
                                 FILE_FLAG_RANDOM_ACCESS,
                                 NULL);
-	
+
     if(LogFile->hFile == INVALID_HANDLE_VALUE)
     {
 		DPRINT1("Can't create file %S.\n", FileName);
-        HeapFree(MyHeap, 0, LogFile); 
+        HeapFree(MyHeap, 0, LogFile);
 		return NULL;
 	}
-	
+
 	bCreateNew = (GetLastError() == ERROR_ALREADY_EXISTS) ? FALSE : TRUE;
-	
-	LogFile->LogName = HeapAlloc(MyHeap,
+
+	LogFile->LogName = (WCHAR*) HeapAlloc(MyHeap,
 		HEAP_ZERO_MEMORY,
 		(lstrlenW(LogName)+1)*sizeof(WCHAR));
-    
+
     if(LogFile->LogName) lstrcpyW(LogFile->LogName, LogName);
-	else 
+	else
 	{
 		DPRINT1("Can't allocate heap\n");
 		HeapFree(MyHeap, 0, LogFile);
 		return NULL;
 	}
-    
-	LogFile->FileName = HeapAlloc(MyHeap,
+
+	LogFile->FileName = (WCHAR*) HeapAlloc(MyHeap,
 		HEAP_ZERO_MEMORY,
 		(lstrlenW(FileName)+1)*sizeof(WCHAR));
-    
+
     if(LogFile->FileName) lstrcpyW(LogFile->FileName, FileName);
 	else
 	{
@@ -311,7 +311,7 @@
 		goto fail;
 	}
 
-	LogFile->OffsetInfo = (PEVENT_OFFSET_INFO) 
+	LogFile->OffsetInfo = (PEVENT_OFFSET_INFO)
 		HeapAlloc(MyHeap, HEAP_ZERO_MEMORY, sizeof(EVENT_OFFSET_INFO)*64);
 
 	if(!LogFile->OffsetInfo)
@@ -327,7 +327,7 @@
 	else bResult = LogfInitializeExisting(LogFile);
 
 	if(!bResult) goto fail;
-    
+
     InitializeCriticalSection(&LogFile->cs);
     LogfListAddItem(LogFile);
     return LogFile;
@@ -349,34 +349,34 @@
 		return;
 
     EnterCriticalSection(&LogFile->cs);
-    
+
     FlushFileBuffers(LogFile->hFile);
     CloseHandle(LogFile->hFile);
-    
+
     LogfListRemoveItem(LogFile);
     DeleteCriticalSection(&LogFile->cs);
-    
+
     HeapFree(MyHeap, 0, LogFile->LogName);
     HeapFree(MyHeap, 0, LogFile->FileName);
 	HeapFree(MyHeap, 0, LogFile->OffsetInfo);
     HeapFree(MyHeap, 0, LogFile);
-    
+
     return;
 }
 
 PLOGFILE LogfListItemByName(WCHAR *Name)
 {
     PLOGFILE Item, Ret = NULL;
-    
+
     EnterCriticalSection(&LogListCs);
-    
+
     for(Item = LogListHead; Item; Item = (PLOGFILE)Item->Next)
         if(Item->LogName && lstrcmpi(Item->LogName, Name)==0)
         {
         	Ret = Item;
             break;
         }
-	
+
 	LeaveCriticalSection(&LogListCs);
     return Ret;
 }
@@ -395,7 +395,7 @@
         	ret = i;
             break;
         }
-    
+
 	LeaveCriticalSection(&LogListCs);
 	return ret;
 }
@@ -405,11 +405,11 @@
 {
     INT i = 1;
     PLOGFILE Item = LogListHead;
-    
+
     EnterCriticalSection(&LogListCs);
-    for(; Item && i<Index; Item = (PLOGFILE)Item->Next, i++); 
+    for(; Item && i<Index; Item = (PLOGFILE)Item->Next, i++);
     LeaveCriticalSection(&LogListCs);
-    
+
     return Item;
 }
 
@@ -417,40 +417,40 @@
 {
     PLOGFILE Item = LogListHead;
     INT i = 0;
-    
+
     EnterCriticalSection(&LogListCs);
-    while(Item) 
+    while(Item)
     {
     	i++;
     	Item = (PLOGFILE) Item->Next;
     }
     LeaveCriticalSection(&LogListCs);
-    
+
     return i;
 }
 
 VOID LogfListAddItem(PLOGFILE Item)
 {
     EnterCriticalSection(&LogListCs);
-    
+
 	if(LogListHead)
     {
     	PLOGFILE List = LogListHead;
-        
-        while(List->Next) 
+
+        while(List->Next)
             List = (PLOGFILE)List->Next;
-                
+
         Item->Prev = (PVOID)List;
         Item->Next = NULL;
         List->Next = Item;
     }
-    else 
+    else
     {
         Item->Next = NULL;
         Item->Prev = NULL;
         LogListHead = Item;
     }
-    
+
     LeaveCriticalSection(&LogListCs);
 }
 
@@ -458,7 +458,7 @@
 {
     PLOGFILE prev = (PLOGFILE)Item->Prev;
     PLOGFILE next = (PLOGFILE)Item->Next;
-	
+
 	EnterCriticalSection(&LogListCs);
 
     if(prev && next)
@@ -473,7 +473,7 @@
     }
     else if(prev) prev->Next = NULL;
     else LogListHead = NULL;
-        
+
     LeaveCriticalSection(&LogListCs);
 
 }
@@ -505,11 +505,11 @@
 	{
 		return FALSE;
 	}
-	
+
 	dwRecNum = RecordNumber;
 	EnterCriticalSection(&LogFile->cs);
 	dwOffset = LogfOffsetByNumber(LogFile, dwRecNum);
-	
+
 	if(!dwOffset)
 	{
 		LeaveCriticalSection(&LogFile->cs);
@@ -523,14 +523,14 @@
 		LeaveCriticalSection(&LogFile->cs);
 		return FALSE;
 	}
-	
+
 	if(!ReadFile(LogFile->hFile, &dwRecSize, sizeof(DWORD), &dwRead, NULL))
 	{
 		DPRINT1("ReadFile() failed! %d\n", GetLastError());
 		LeaveCriticalSection(&LogFile->cs);
 		return FALSE;
 	}
-	
+
 	if(dwRecSize > BufSize)
 	{
 		*BytesRead = 0;
@@ -540,9 +540,9 @@
 		return FALSE;
 	}
 
-	if(SetFilePointer(LogFile->hFile, 
-				   -((LONG)sizeof(DWORD)), 
-				   NULL, 
+	if(SetFilePointer(LogFile->hFile,
+				   -((LONG)sizeof(DWORD)),
+				   NULL,
 				   FILE_CURRENT) == INVALID_SET_FILE_POINTER)
 	{
 		DPRINT1("SetFilePointer() failed! %d\n", GetLastError());
@@ -556,7 +556,7 @@
 		LeaveCriticalSection(&LogFile->cs);
 		return FALSE;
 	}
-	
+
 	dwBufferUsage+=dwRead;
 
 	while(dwBufferUsage<BufSize)
@@ -575,17 +575,17 @@
 			LeaveCriticalSection(&LogFile->cs);
 			return FALSE;
 		}
-		
+
 		if(!ReadFile(LogFile->hFile, &dwRecSize, sizeof(DWORD), &dwRead, NULL))
 		{
 			DPRINT1("ReadFile() failed! %d\n", GetLastError());
 			LeaveCriticalSection(&LogFile->cs);
 			return FALSE;
 		}
-		
+
 		if(dwBufferUsage+dwRecSize>BufSize)break;
 
-		if(SetFilePointer(LogFile->hFile, 
+		if(SetFilePointer(LogFile->hFile,
 					   -((LONG)sizeof(DWORD)),
 					   NULL,
 					   FILE_CURRENT) == INVALID_SET_FILE_POINTER)
@@ -594,8 +594,8 @@
 			LeaveCriticalSection(&LogFile->cs);
 			return FALSE;
 		}
-		
-		if(!ReadFile(LogFile->hFile, 
+
+		if(!ReadFile(LogFile->hFile,
 				 Buffer+dwBufferUsage,
 				 dwRecSize,
 				 &dwRead,
@@ -629,18 +629,18 @@
 
 	GetSystemTime(&st);
 	SystemTimeToEventTime(&st, &((PEVENTLOGRECORD)Buffer)->TimeWritten);
-	
+
 	EnterCriticalSection(&LogFile->cs);
 
-	if(SetFilePointer(LogFile->hFile, 
-		LogFile->Header.EofOffset, 
+	if(SetFilePointer(LogFile->hFile,
+		LogFile->Header.EofOffset,
 		NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
 	{
 		DPRINT1("SetFilePointer() failed! %d\n", GetLastError());
 		LeaveCriticalSection(&LogFile->cs);
 		return FALSE;
 	}
-	
+
 	if(!WriteFile(LogFile->hFile, Buffer, BufSize, &dwWritten, NULL))
 	{
 		DPRINT1("WriteFile() failed! %d\n", GetLastError());
@@ -648,8 +648,8 @@
 		return FALSE;
 	}
 
-	if(!LogfAddOffsetInformation(LogFile, 
-			LogFile->Header.NextRecord, 
+	if(!LogfAddOffsetInformation(LogFile,
+			LogFile->Header.NextRecord,
 			LogFile->Header.EofOffset))
 	{
 		LeaveCriticalSection(&LogFile->cs);
@@ -658,7 +658,7 @@
 
 	LogFile->Header.NextRecord++;
 	LogFile->Header.EofOffset += dwWritten;
-	
+
 	if(LogFile->Header.OldestRecord == 0)
 		LogFile->Header.OldestRecord = 1;
 
@@ -673,9 +673,9 @@
 	EofRec.StartOffset = LogFile->Header.FirstRecordOffset;
 	EofRec.EndOffset = LogFile->Header.EofOffset;
 
-	if(!WriteFile(LogFile->hFile, 
-		&EofRec, 
-		sizeof(EOF_RECORD), 
+	if(!WriteFile(LogFile->hFile,
+		&EofRec,
+		sizeof(EOF_RECORD),
 		&dwWritten, NULL))
 	{
 		DPRINT1("WriteFile() failed! %d\n", GetLastError());
@@ -683,25 +683,25 @@
 		return FALSE;
 	}
 
-	if(SetFilePointer(LogFile->hFile, 0, NULL, FILE_BEGIN) 
+	if(SetFilePointer(LogFile->hFile, 0, NULL, FILE_BEGIN)
 		== INVALID_SET_FILE_POINTER)
 	{
 		DPRINT1("SetFilePointer() failed! %d\n", GetLastError());
 		LeaveCriticalSection(&LogFile->cs);
 		return FALSE;
 	}
-	
-	if(!WriteFile(LogFile->hFile, 
-		&LogFile->Header, 
-		sizeof(FILE_HEADER), 
-		&dwWritten, 
+
+	if(!WriteFile(LogFile->hFile,
+		&LogFile->Header,
+		sizeof(FILE_HEADER),
+		&dwWritten,
 		NULL))
 	{
 		DPRINT1("WriteFile failed! LastError = %d\n", GetLastError());
 		LeaveCriticalSection(&LogFile->cs);
 		return FALSE;
 	}
-	
+
 	if(!FlushFileBuffers(LogFile->hFile))
 	{
 		LeaveCriticalSection(&LogFile->cs);
@@ -711,7 +711,7 @@
 
 	LeaveCriticalSection(&LogFile->cs);
 	return TRUE;
-}    
+}
 
 ULONG LogfOffsetByNumber(PLOGFILE LogFile,
 						 DWORD RecordNumber)
@@ -729,15 +729,15 @@
 	return LogFile->Header.OldestRecord;
 }
 
-BOOL LogfAddOffsetInformation(PLOGFILE LogFile, 
+BOOL LogfAddOffsetInformation(PLOGFILE LogFile,
 							  ULONG ulNumber,
 							  ULONG ulOffset)
 {
 	LPVOID NewOffsetInfo;
-	
+
 	if(LogFile->OffsetInfoNext == LogFile->OffsetInfoSize)
 	{
-		NewOffsetInfo = HeapReAlloc(MyHeap, 
+		NewOffsetInfo = HeapReAlloc(MyHeap,
 									HEAP_ZERO_MEMORY,
 									LogFile->OffsetInfo,
 									(LogFile->OffsetInfoSize+64)*
@@ -780,7 +780,7 @@
 	UINT i, pos, nStrings;
 	PBYTE Buffer;
 
-	dwRecSize = sizeof(EVENTLOGRECORD) + (lstrlenW(ComputerName) + 
+	dwRecSize = sizeof(EVENTLOGRECORD) + (lstrlenW(ComputerName) +
 	lstrlenW(SourceName) + 2)*sizeof(WCHAR);
 
 	if(dwRecSize % 4 != 0) dwRecSize += 4 - (dwRecSize % 4);
@@ -796,7 +796,7 @@
 	if(dwRecSize % 4 != 0) dwRecSize += 4 - (dwRecSize % 4);
 	dwRecSize+=4;
 
-	Buffer = HeapAlloc(MyHeap, HEAP_ZERO_MEMORY, dwRecSize);
+	Buffer = (BYTE*) HeapAlloc(MyHeap, HEAP_ZERO_MEMORY, dwRecSize);
 	if(!Buffer)
 	{
 		DPRINT1("Can't allocate heap!\n");
@@ -854,7 +854,7 @@
 
 	if(pos % 4 != 0) pos += 4 - (pos % 4);
 	*((PDWORD)(Buffer+pos)) = dwRecSize;
-	
+
 	*lpRecSize = dwRecSize;
 	return Buffer;
 }

Modified: trunk/reactos/base/setup/welcome/welcome.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/welcome.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/setup/welcome/welcome.c (original)
+++ trunk/reactos/base/setup/welcome/welcome.c Fri Jan  5 23:22:44 2007
@@ -300,7 +300,7 @@
   rect.top = 0;
   rect.bottom = 25;
 
-  hOldFont = SelectObject(hDC, hFont);
+  hOldFont = (HFONT) SelectObject(hDC, hFont);
   DrawText(hDC, szText, -1, &rect, DT_TOP | DT_CALCRECT | DT_WORDBREAK);
   SelectObject(hDC, hOldFont);
 
@@ -487,7 +487,7 @@
   HBRUSH hOldBrush;
 
   /* Title bitmap */
-  hOldBitmap = SelectObject(hdcMem, hTitleBitmap);
+  hOldBitmap = (HBITMAP) SelectObject(hdcMem, hTitleBitmap);
   BitBlt(hdc,
 	 rcPanel->left,
 	 rcPanel->top,
@@ -497,7 +497,7 @@
   SelectObject(hdcMem, hOldBitmap);
 
   /* Dark blue line */
-  hOldBrush = SelectObject(hdc, hbrDarkBlue);
+  hOldBrush = (HBRUSH) SelectObject(hdc, hbrDarkBlue);
   PatBlt(hdc,
 	 rcPanel->left,
 	 rcPanel->bottom - 3,
@@ -535,7 +535,7 @@
   PaintBanner(hdc, &rcTitlePanel);
 
   /* Left panel */
-  hOldBrush = SelectObject (hdc, hbrLightBlue);
+  hOldBrush = (HBRUSH) SelectObject (hdc, hbrLightBlue);
   PatBlt(hdc,
 	 rcLeftPanel.left,
 	 rcLeftPanel.top,
@@ -545,7 +545,7 @@
   SelectObject(hdc, hOldBrush);
 
   /* Right panel */
-  hOldBrush = SelectObject (hdc, WHITE_BRUSH);
+  hOldBrush = (HBRUSH) SelectObject (hdc, WHITE_BRUSH);
   PatBlt(hdc,
 	 rcRightPanel.left,
 	 rcRightPanel.top,
@@ -556,7 +556,7 @@
 
   /* Draw dark verical line */
   hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
-  hOldPen = SelectObject(hdc, hPen);
+  hOldPen = (HPEN) SelectObject(hdc, hPen);
   MoveToEx(hdc, rcRightPanel.left, rcRightPanel.top, NULL);
   LineTo(hdc, rcRightPanel.left, rcRightPanel.bottom);
   SelectObject(hdc, hOldPen);
@@ -566,7 +566,7 @@
   if ((nTopic == -1) && (hDefaultTopicBitmap != 0))
     {
       GetObject(hDefaultTopicBitmap, sizeof(BITMAP), &bmpInfo);
-      hOldBitmap = SelectObject (hdcMem, hDefaultTopicBitmap);
+      hOldBitmap = (HBITMAP) SelectObject (hdcMem, hDefaultTopicBitmap);
       BitBlt(hdc,
 	     rcRightPanel.right - bmpInfo.bmWidth,
 	     rcRightPanel.bottom - bmpInfo.bmHeight,
@@ -580,7 +580,7 @@
   else if ((nTopic != -1) && (hTopicBitmap[nTopic] != 0))
     {
       GetObject(hTopicBitmap[nTopic], sizeof(BITMAP), &bmpInfo);
-      hOldBitmap = SelectObject (hdcMem, hTopicBitmap[nTopic]);
+      hOldBitmap = (HBITMAP) SelectObject (hdcMem, hTopicBitmap[nTopic]);
       BitBlt(hdc,
 	     rcRightPanel.right - bmpInfo.bmWidth,
 	     rcRightPanel.bottom - bmpInfo.bmHeight,
@@ -626,7 +626,7 @@
   rcTitle.right = rcLeftPanel.right - 5;
   rcTitle.top = rcLeftPanel.bottom - 40;
   rcTitle.bottom = rcLeftPanel.bottom - 5;
-  hOldFont = SelectObject(hdc, hfontTopicDescription);
+  hOldFont = (HFONT) SelectObject(hdc, hfontTopicDescription);
   DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_CALCRECT | DT_SINGLELINE);
   DrawText(hdc, version, -1, &rcTitle, DT_BOTTOM | DT_SINGLELINE);
   SelectObject(hdc, hOldFont);
@@ -636,7 +636,7 @@
   rcTitle.right = rcRightPanel.right - 8;
   rcTitle.top = rcRightPanel.top + 8;
   rcTitle.bottom = rcTitle.top + 57;
-  hOldFont = SelectObject(hdc, hfontTopicTitle);
+  hOldFont = (HFONT) SelectObject(hdc, hfontTopicTitle);
   DrawText(hdc, szTopicTitle, -1, &rcTitle, DT_TOP | DT_CALCRECT);
 
   SetTextColor(hdc, DARK_BLUE);
@@ -686,9 +686,9 @@
   else
     {
       if (lpDis->CtlID == (ULONG)nTopic)
-	hOldBrush = SelectObject(lpDis->hDC, hbrRightPanel);
+	hOldBrush = (HBRUSH) SelectObject(lpDis->hDC, hbrRightPanel);
       else
-	hOldBrush = SelectObject(lpDis->hDC, hbrLightBlue);
+	hOldBrush = (HBRUSH) SelectObject(lpDis->hDC, hbrLightBlue);
 
       PatBlt(lpDis->hDC,
 	     lpDis->rcItem.left,
@@ -699,7 +699,7 @@
       SelectObject(lpDis->hDC, hOldBrush);
 
       hPen = CreatePen(PS_SOLID, 0, DARK_BLUE);
-      hOldPen = SelectObject(lpDis->hDC, hPen);
+      hOldPen = (HPEN) SelectObject(lpDis->hDC, hPen);
       MoveToEx(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.bottom-1, NULL);
       LineTo(lpDis->hDC, lpDis->rcItem.right, lpDis->rcItem.bottom-1);
       SelectObject(lpDis->hDC, hOldPen);
@@ -723,7 +723,7 @@
 {
   UNREFERENCED_PARAMETER(wParam);
   UNREFERENCED_PARAMETER(lParam);
- 
+
   if (nTopic != -1)
     {
       nTopic = -1;

Modified: trunk/reactos/base/shell/cmd/batch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/batch.c (original)
+++ trunk/reactos/base/shell/cmd/batch.c Fri Jan  5 23:22:44 2007
@@ -221,7 +221,7 @@
 	SetLastError(0);
 	hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL,
 			    OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL |
-				 FILE_FLAG_SEQUENTIAL_SCAN, NULL);	
+				 FILE_FLAG_SEQUENTIAL_SCAN, NULL);
 
 #ifdef _DEBUG
 	DebugPrintf (_T("Batch: (\'%s\', \'%s\', \'%s\')  hFile = %x\n"),
@@ -264,7 +264,7 @@
 	}
 
 	bc->hBatchFile = hFile;
-	SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN); 
+	SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN);
 	bc->bEcho = bEcho; /* Preserve echo across batch calls */
 	bc->shiftlevel = 0;
 
@@ -275,7 +275,7 @@
     //
     // Allocate enough memory to hold the params and copy them over without modifications
     //
-    bc->raw_params = malloc((_tcslen(param)+1) * sizeof(TCHAR));
+    bc->raw_params = (TCHAR*) malloc((_tcslen(param)+1) * sizeof(TCHAR));
     if (bc->raw_params != NULL)
     {
         memset (bc->raw_params, 0, _tcslen(bc->raw_params) * sizeof(TCHAR));

Modified: trunk/reactos/base/system/expand/expand.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/expand/expand.rbuild?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/expand/expand.rbuild (original)
+++ trunk/reactos/base/system/expand/expand.rbuild Fri Jan  5 23:22:44 2007
@@ -2,7 +2,7 @@
 <!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
 <module name="expand" type="win32cui" installbase="system32" installname="expand.exe" usewrc="false">
 	<include base="ReactOS">include/reactos/wine</include>
-	<include base="cmd">.</include>
+	<include base="expand">.</include>
 	<define name="__USE_W32API" />
 	<define name="ANONYMOUSUNIONS" />
 	<define name="_WIN32_WINNT">0x0501</define>

Modified: trunk/reactos/base/system/msiexec/msiexec.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/msiexec/msiexec.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/msiexec/msiexec.c (original)
+++ trunk/reactos/base/system/msiexec/msiexec.c Fri Jan  5 23:22:44 2007
@@ -135,7 +135,7 @@
 	for(list = property_list; list; list = list->next)
 		len += lstrlenW(list->str) + 3;
 
-	ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
+	ret = (WCHAR*) HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
 
 	/* add a space before each string, and quote the value */
 	p = ret;
@@ -179,7 +179,7 @@
 	for(list = transform_list; list; list = list->next)
 		len += lstrlenW(list->str) + 1;
 
-	ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
+	ret = (WCHAR*) HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
 
 	/* add all the transforms with a semicolon between each one */
 	p = ret;
@@ -211,7 +211,7 @@
 static LPWSTR msi_strdup(LPCWSTR str)
 {
 	DWORD len = lstrlenW(str)+1;
-	LPWSTR ret = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+	LPWSTR ret = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
 	lstrcpyW(ret, str);
 	return ret;
 }
@@ -227,7 +227,7 @@
 		return TRUE;
 	if( lstrlenW(str1) != (len-1) )
 		return TRUE;
-	strW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+	strW = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
 	MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
 	ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len, strW, len);
 	HeapFree(GetProcessHeap(), 0, strW);
@@ -245,7 +245,7 @@
 		return TRUE;
 	if( lstrlenW(str1) < (len-1) )
 		return TRUE;
-	strW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+	strW = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
 	MultiByteToWideChar( CP_ACP, 0, str2, -1, strW, len);
 	ret = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, str1, len-1, strW, len-1);
 	HeapFree(GetProcessHeap(), 0, strW);
@@ -393,7 +393,7 @@
 	int i, n;
 
 	n = chomp( p );
-	argv = HeapAlloc(GetProcessHeap(), 0, sizeof (WCHAR*)*(n+1));
+	argv = (WCHAR**) HeapAlloc(GetProcessHeap(), 0, sizeof (WCHAR*)*(n+1));
 	for( i=0; i<n; i++ )
 	{
 		argv[i] = p;
@@ -419,7 +419,7 @@
 	r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
 	if(r == ERROR_SUCCESS && type == REG_SZ)
 	{
-		buf = HeapAlloc(GetProcessHeap(), 0, sz);
+		buf = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, sz);
 		r = RegQueryValueExW(hkey, ident, 0, &type, (LPBYTE)buf, &sz);
 		if( r == ERROR_SUCCESS )
 		{
@@ -781,23 +781,23 @@
 			}
 			else if(!msi_strequal(argvW[i]+2, "f"))
 			{
-				InstallUILevel = INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG;
+				InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_FULL|INSTALLUILEVEL_ENDDIALOG);
 			}
 			else if(!msi_strequal(argvW[i]+2, "n+"))
 			{
-				InstallUILevel = INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG;
+				InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_NONE|INSTALLUILEVEL_ENDDIALOG);
 			}
 			else if(!msi_strequal(argvW[i]+2, "b+"))
 			{
-				InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
+				InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG);
 			}
 			else if(!msi_strequal(argvW[i]+2, "b-"))
 			{
-				InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY;
+				InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_PROGRESSONLY);
 			}
 			else if(!msi_strequal(argvW[i]+2, "b+!"))
 			{
-				InstallUILevel = INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG;
+				InstallUILevel = (INSTALLUILEVEL) (INSTALLUILEVEL_BASIC|INSTALLUILEVEL_ENDDIALOG);
 				WINE_FIXME("Unknown modifier: !\n");
 			}
 			else

Modified: trunk/reactos/base/system/services/database.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/database.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/services/database.c (original)
+++ trunk/reactos/base/system/services/database.c Fri Jan  5 23:22:44 2007
@@ -137,7 +137,7 @@
     DPRINT("Service: '%S'\n", lpServiceName);
 
     /* Allocate service entry */
-    lpService = HeapAlloc(GetProcessHeap(),
+    lpService = (SERVICE*) HeapAlloc(GetProcessHeap(),
                           HEAP_ZERO_MEMORY,
                           sizeof(SERVICE) + ((wcslen(lpServiceName) + 1) * sizeof(WCHAR)));
     if (lpService == NULL)
@@ -449,7 +449,7 @@
 
     BufferLength = sizeof(OBJECT_DIRECTORY_INFORMATION) +
                    2 * MAX_PATH * sizeof(WCHAR);
-    DirInfo = HeapAlloc(GetProcessHeap(),
+    DirInfo = (OBJECT_DIRECTORY_INFORMATION*) HeapAlloc(GetProcessHeap(),
                         HEAP_ZERO_MEMORY,
                         BufferLength);
 
@@ -541,7 +541,7 @@
 
     DPRINT("ScmControlService() called\n");
 
-    ControlPacket = HeapAlloc(GetProcessHeap(),
+    ControlPacket = (SCM_CONTROL_PACKET*) HeapAlloc(GetProcessHeap(),
                               HEAP_ZERO_MEMORY,
                               sizeof(SCM_CONTROL_PACKET));
     if (ControlPacket == NULL)
@@ -600,7 +600,7 @@
     DPRINT("ArgsLength: %ld\nTotalLength: %ld\n\n", ArgsLength, TotalLength);
 
     /* Allocate a control packet */
-    ControlPacket = HeapAlloc(GetProcessHeap(),
+    ControlPacket = (SCM_CONTROL_PACKET*) HeapAlloc(GetProcessHeap(),
                               HEAP_ZERO_MEMORY,
                               sizeof(SCM_CONTROL_PACKET) + (TotalLength - 1) * sizeof(WCHAR));
     if (ControlPacket == NULL)

Modified: trunk/reactos/base/system/services/driver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/driver.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/services/driver.c (original)
+++ trunk/reactos/base/system/services/driver.c Fri Jan  5 23:22:44 2007
@@ -123,7 +123,7 @@
 
     BufferLength = sizeof(OBJECT_DIRECTORY_INFORMATION) +
                    2 * MAX_PATH * sizeof(WCHAR);
-    DirInfo = HeapAlloc(GetProcessHeap(),
+    DirInfo = (OBJECT_DIRECTORY_INFORMATION*) HeapAlloc(GetProcessHeap(),
                         HEAP_ZERO_MEMORY,
                         BufferLength);
 

Modified: trunk/reactos/base/system/services/groupdb.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/groupdb.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/services/groupdb.c (original)
+++ trunk/reactos/base/system/services/groupdb.c Fri Jan  5 23:22:44 2007
@@ -139,13 +139,13 @@
 
         Group = (PSERVICE_GROUP)HeapAlloc(GetProcessHeap(),
                                           HEAP_ZERO_MEMORY,
-                                          sizeof(SERVICE_GROUP) + (wcslen(ValueData) * sizeof(WCHAR)));
+                                          sizeof(SERVICE_GROUP) + (wcslen((const wchar_t*) ValueData) * sizeof(WCHAR)));
         if (Group == NULL)
         {
             return STATUS_INSUFFICIENT_RESOURCES;
         }
 
-        wcscpy(Group->szGroupName, ValueData);
+        wcscpy(Group->szGroupName, (const wchar_t*) ValueData);
         Group->lpGroupName = Group->szGroupName;
         Group->dwRefCount = (DWORD)-1;
 

Modified: trunk/reactos/base/system/services/rpcserver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcserver.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c (original)
+++ trunk/reactos/base/system/services/rpcserver.c Fri Jan  5 23:22:44 2007
@@ -146,7 +146,7 @@
     if (lpDatabaseName == NULL)
         lpDatabaseName = SERVICES_ACTIVE_DATABASEW;
 
-    Ptr = HeapAlloc(GetProcessHeap(),
+    Ptr = (MANAGER_HANDLE*) HeapAlloc(GetProcessHeap(),
                     HEAP_ZERO_MEMORY,
                     sizeof(MANAGER_HANDLE) + wcslen(lpDatabaseName) * sizeof(WCHAR));
     if (Ptr == NULL)
@@ -171,7 +171,7 @@
 {
     PSERVICE_HANDLE Ptr;
 
-    Ptr = HeapAlloc(GetProcessHeap(),
+    Ptr = (SERVICE_HANDLE*) HeapAlloc(GetProcessHeap(),
                     HEAP_ZERO_MEMORY,
                     sizeof(SERVICE_HANDLE));
     if (Ptr == NULL)
@@ -1033,7 +1033,7 @@
          * first part of full file name is the OS directory */
         if (lpBinaryPathName[1] == ':') lpBinaryPathName += GetWindowsDirectoryW(NULL, 0);
 
-        lpImagePath = HeapAlloc(GetProcessHeap(),
+        lpImagePath = (WCHAR*) HeapAlloc(GetProcessHeap(),
                                 HEAP_ZERO_MEMORY,
                                 (wcslen(lpBinaryPathName) + 1) * sizeof(WCHAR));
         if (lpImagePath == NULL)
@@ -1060,7 +1060,7 @@
         *lpDisplayName != 0 &&
         wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
     {
-        lpService->lpDisplayName = HeapAlloc(GetProcessHeap(), 0,
+        lpService->lpDisplayName = (WCHAR*) HeapAlloc(GetProcessHeap(), 0,
                                              (wcslen(lpDisplayName) + 1) * sizeof(WCHAR));
         if (lpService->lpDisplayName == NULL)
         {

Modified: trunk/reactos/base/system/userinit/userinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/userinit/userinit.c?rev=25316&r1=25315&r2=25316&view=diff
==============================================================================
--- trunk/reactos/base/system/userinit/userinit.c (original)
+++ trunk/reactos/base/system/userinit/userinit.c Fri Jan  5 23:22:44 2007
@@ -51,7 +51,7 @@
 		return rc;
 	if (dwType != REG_SZ)
 		return ERROR_FILE_NOT_FOUND;
-	Value = HeapAlloc(GetProcessHeap(), 0, cbData + sizeof(WCHAR));
+	Value = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, cbData + sizeof(WCHAR));
 	if (!Value)
 		return ERROR_NOT_ENOUGH_MEMORY;
 	rc = RegQueryValueExW(hKey, pszKey, NULL, NULL, (LPBYTE)Value, &cbData);




More information about the Ros-diffs mailing list