* fixed a bug in AddPartitionToList (value must be of type FORMATSTATE instead of MEDIA_TYPE

* fixed some warnings

svn path=/trunk/; revision=25315
This commit is contained in:
Christoph von Wittich 2007-01-05 20:19:21 +00:00
parent aafd5a63ad
commit d2e64780de
7 changed files with 56 additions and 56 deletions

View file

@ -170,7 +170,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
if (SourceCabinet != NULL)
{
Length = wcslen(SourceCabinet);
Entry->SourceCabinet = RtlAllocateHeap(ProcessHeap,
Entry->SourceCabinet = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->SourceCabinet == NULL)
@ -188,7 +188,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
/* Copy source root path */
Length = wcslen(SourceRootPath);
Entry->SourceRootPath = RtlAllocateHeap(ProcessHeap,
Entry->SourceRootPath = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->SourceRootPath == NULL)
@ -207,7 +207,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
if (SourcePath != NULL)
{
Length = wcslen(SourcePath);
Entry->SourcePath = RtlAllocateHeap(ProcessHeap,
Entry->SourcePath = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->SourcePath == NULL)
@ -226,7 +226,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
/* Copy source file name */
Length = wcslen(SourceFilename);
Entry->SourceFilename = RtlAllocateHeap(ProcessHeap,
Entry->SourceFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->SourceFilename == NULL)
@ -247,7 +247,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
Length = wcslen(TargetDirectory);
if (TargetDirectory[Length] == '\\')
Length--;
Entry->TargetDirectory = RtlAllocateHeap(ProcessHeap,
Entry->TargetDirectory = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->TargetDirectory == NULL)
@ -269,7 +269,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
if (TargetFilename != NULL)
{
Length = wcslen(TargetFilename);
Entry->TargetFilename = RtlAllocateHeap(ProcessHeap,
Entry->TargetFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->TargetFilename == NULL)

View file

@ -160,7 +160,7 @@ IniCacheAddKey(PINICACHESECTION Section,
sizeof(INICACHEKEY));
Key->Name = RtlAllocateHeap(ProcessHeap,
Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(NameLength + 1) * sizeof(WCHAR));
if (Key->Name == NULL)
@ -180,7 +180,7 @@ IniCacheAddKey(PINICACHESECTION Section,
Key->Name[NameLength] = 0;
Key->Data = RtlAllocateHeap(ProcessHeap,
Key->Data = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(DataLength + 1) * sizeof(WCHAR));
if (Key->Data == NULL)
@ -277,7 +277,7 @@ IniCacheAddSection(PINICACHE Cache,
sizeof(INICACHESECTION));
/* Allocate and initialize section name */
Section->Name = RtlAllocateHeap(ProcessHeap,
Section->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(NameLength + 1) * sizeof(WCHAR));
if (Section->Name == NULL)
@ -576,7 +576,7 @@ IniCacheLoad(PINICACHE *Cache,
DPRINT("File size: %lu\n", FileLength);
/* Allocate file buffer */
FileBuffer = RtlAllocateHeap(ProcessHeap,
FileBuffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
0,
FileLength + 1);
if (FileBuffer == NULL)
@ -891,7 +891,7 @@ IniCacheInsertKey(PINICACHESECTION Section,
sizeof(INICACHEKEY));
/* Allocate name buffer */
Key->Name = RtlAllocateHeap(ProcessHeap,
Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(Name) + 1) * sizeof(WCHAR));
if (Key->Name == NULL)
@ -907,7 +907,7 @@ IniCacheInsertKey(PINICACHESECTION Section,
wcscpy(Key->Name, Name);
/* Allocate data buffer */
Key->Data = RtlAllocateHeap(ProcessHeap,
Key->Data = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(Data) + 1) * sizeof(WCHAR));
if (Key->Data == NULL)
@ -1035,7 +1035,7 @@ IniCacheSave(PINICACHE Cache,
DPRINT1("BufferSize: %lu\n", BufferSize);
/* Allocate file buffer */
Buffer = RtlAllocateHeap(ProcessHeap,
Buffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
0,
BufferSize);
if (Buffer == NULL)
@ -1153,7 +1153,7 @@ IniCacheAppendSection(PINICACHE Cache,
sizeof(INICACHESECTION));
/* Allocate and initialize section name */
Section->Name = RtlAllocateHeap(ProcessHeap,
Section->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(Name) + 1) * sizeof(WCHAR));
if (Section->Name == NULL)

View file

@ -2859,9 +2859,9 @@ PrepareCopyPage(PINPUT_RECORD Ir)
return QUIT_PAGE;
}
InfHandle = INF_OpenBufferedFileA(InfFileData,
InfHandle = INF_OpenBufferedFileA((CHAR*) InfFileData,
InfFileSize,
NULL,
(const CHAR*) NULL,
INF_STYLE_WIN4,
&ErrorLine);
if (InfHandle == INVALID_HANDLE_VALUE)
@ -3518,11 +3518,11 @@ RunUSetup(VOID)
break;
case FORMAT_PARTITION_PAGE:
Page = FormatPartitionPage(&Ir);
Page = (PAGE_NUMBER) FormatPartitionPage(&Ir);
break;
case CHECK_FILE_SYSTEM_PAGE:
Page = CheckFileSystemPage(&Ir);
Page = (PAGE_NUMBER) CheckFileSystemPage(&Ir);
break;
case INSTALL_DIRECTORY_PAGE:

View file

@ -194,7 +194,7 @@ WriteConsoleOutputCharacterA(
PCHAR pText;
NTSTATUS Status;
Buffer = RtlAllocateHeap(
Buffer = (CHAR*) RtlAllocateHeap(
ProcessHeap,
0,
nLength + sizeof(COORD));
@ -242,7 +242,7 @@ WriteConsoleOutputCharacterW(
NTSTATUS Status;
ULONG i;
Buffer = RtlAllocateHeap(
Buffer = (CHAR*) RtlAllocateHeap(
ProcessHeap,
0,
nLength + sizeof(COORD));

View file

@ -287,7 +287,7 @@ AddPartitionToList (ULONG DiskNumber,
}
else
{
PartEntry->FormatState = Unknown;
PartEntry->FormatState = UnknownFormat;
}
InsertTailList (&DiskEntry->PartListHead,
@ -514,7 +514,7 @@ SystemConfigurationDataQueryRoutine(PWSTR ValueName,
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize % sizeof(CM_INT13_DRIVE_PARAMETER) != 0)
continue;
*Int13Drives = RtlAllocateHeap(ProcessHeap, 0, FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
*Int13Drives = (CM_INT13_DRIVE_PARAMETER*) RtlAllocateHeap(ProcessHeap, 0, FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
if (*Int13Drives == NULL)
return STATUS_NO_MEMORY;
memcpy(
@ -605,7 +605,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
DiskCount = 0;
while (1)
{
BiosDiskEntry = RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
BiosDiskEntry = (BIOSDISKENTRY*) RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
if (BiosDiskEntry == NULL)
{
break;
@ -716,7 +716,7 @@ AddDiskToList (HANDLE FileHandle,
return;
}
Mbr = RtlAllocateHeap(ProcessHeap,
Mbr = (PARTITION_SECTOR*) RtlAllocateHeap(ProcessHeap,
0,
DiskGeometry.BytesPerSector);
@ -1311,7 +1311,7 @@ PrintDiskData (PPARTLIST List,
{
WriteConsoleOutputCharacterA (StdOutput,
LineBuffer,
min (strlen (LineBuffer), Width - 2),
min ((USHORT)strlen (LineBuffer), Width - 2),
coPos,
&Written);
}

View file

@ -270,7 +270,7 @@ do_reg_operation(HANDLE KeyHandle,
if (Size)
{
Str = RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
Str = (WCHAR*) RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
if (Str == NULL)
return FALSE;
@ -296,7 +296,7 @@ do_reg_operation(HANDLE KeyHandle,
if (Size)
{
Str = RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
Str = (WCHAR*) RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
if (Str == NULL)
return FALSE;
@ -363,7 +363,7 @@ do_reg_operation(HANDLE KeyHandle,
if (Size)
{
Data = RtlAllocateHeap (ProcessHeap, 0, Size);
Data = (unsigned char*) RtlAllocateHeap (ProcessHeap, 0, Size);
if (Data == NULL)
return FALSE;

View file

@ -187,7 +187,7 @@ CreateComputerTypeList(HINF InfFile)
break;
}
UserData = RtlAllocateHeap(ProcessHeap,
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)
@ -308,7 +308,7 @@ GetDisplayIdentifier(PWSTR Identifier,
BufferLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) +
256 * sizeof(WCHAR);
ValueInfo = RtlAllocateHeap(RtlGetProcessHeap(),
ValueInfo = (KEY_VALUE_PARTIAL_INFORMATION*) RtlAllocateHeap(RtlGetProcessHeap(),
0,
BufferLength);
if (ValueInfo == NULL)
@ -443,7 +443,7 @@ CreateDisplayDriverList(HINF InfFile)
break;
}
UserData = RtlAllocateHeap(ProcessHeap,
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)
@ -486,7 +486,7 @@ ProcessComputerFiles(HINF InfFile, PGENERIC_LIST List, PWCHAR* AdditionalSection
}
wcscpy(SectionName, L"Files.");
wcscat(SectionName, Entry->UserData);
wcscat(SectionName, (const wchar_t*) Entry->UserData);
*AdditionalSectionName = SectionName;
return TRUE;
@ -514,7 +514,7 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
return FALSE;
}
if (!SetupFindFirstLineW(InfFile, L"Display", Entry->UserData, &Context))
if (!SetupFindFirstLineW(InfFile, L"Display", (WCHAR*) Entry->UserData, &Context))
{
DPRINT("SetupFindFirstLineW() failed\n");
return FALSE;
@ -637,7 +637,7 @@ CreateKeyboardDriverList(HINF InfFile)
break;
}
UserData = RtlAllocateHeap(ProcessHeap,
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)
@ -695,7 +695,7 @@ CreateKeyboardLayoutList(HINF InfFile)
break;
}
UserData = RtlAllocateHeap(ProcessHeap,
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)