mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 20:55:16 +00:00
* 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:
parent
aafd5a63ad
commit
d2e64780de
|
@ -170,7 +170,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
if (SourceCabinet != NULL)
|
if (SourceCabinet != NULL)
|
||||||
{
|
{
|
||||||
Length = wcslen(SourceCabinet);
|
Length = wcslen(SourceCabinet);
|
||||||
Entry->SourceCabinet = RtlAllocateHeap(ProcessHeap,
|
Entry->SourceCabinet = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourceCabinet == NULL)
|
if (Entry->SourceCabinet == NULL)
|
||||||
|
@ -188,7 +188,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
|
|
||||||
/* Copy source root path */
|
/* Copy source root path */
|
||||||
Length = wcslen(SourceRootPath);
|
Length = wcslen(SourceRootPath);
|
||||||
Entry->SourceRootPath = RtlAllocateHeap(ProcessHeap,
|
Entry->SourceRootPath = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourceRootPath == NULL)
|
if (Entry->SourceRootPath == NULL)
|
||||||
|
@ -207,7 +207,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
if (SourcePath != NULL)
|
if (SourcePath != NULL)
|
||||||
{
|
{
|
||||||
Length = wcslen(SourcePath);
|
Length = wcslen(SourcePath);
|
||||||
Entry->SourcePath = RtlAllocateHeap(ProcessHeap,
|
Entry->SourcePath = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourcePath == NULL)
|
if (Entry->SourcePath == NULL)
|
||||||
|
@ -226,7 +226,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
|
|
||||||
/* Copy source file name */
|
/* Copy source file name */
|
||||||
Length = wcslen(SourceFilename);
|
Length = wcslen(SourceFilename);
|
||||||
Entry->SourceFilename = RtlAllocateHeap(ProcessHeap,
|
Entry->SourceFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourceFilename == NULL)
|
if (Entry->SourceFilename == NULL)
|
||||||
|
@ -247,7 +247,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
Length = wcslen(TargetDirectory);
|
Length = wcslen(TargetDirectory);
|
||||||
if (TargetDirectory[Length] == '\\')
|
if (TargetDirectory[Length] == '\\')
|
||||||
Length--;
|
Length--;
|
||||||
Entry->TargetDirectory = RtlAllocateHeap(ProcessHeap,
|
Entry->TargetDirectory = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->TargetDirectory == NULL)
|
if (Entry->TargetDirectory == NULL)
|
||||||
|
@ -269,7 +269,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
if (TargetFilename != NULL)
|
if (TargetFilename != NULL)
|
||||||
{
|
{
|
||||||
Length = wcslen(TargetFilename);
|
Length = wcslen(TargetFilename);
|
||||||
Entry->TargetFilename = RtlAllocateHeap(ProcessHeap,
|
Entry->TargetFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->TargetFilename == NULL)
|
if (Entry->TargetFilename == NULL)
|
||||||
|
|
|
@ -160,7 +160,7 @@ IniCacheAddKey(PINICACHESECTION Section,
|
||||||
sizeof(INICACHEKEY));
|
sizeof(INICACHEKEY));
|
||||||
|
|
||||||
|
|
||||||
Key->Name = RtlAllocateHeap(ProcessHeap,
|
Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(NameLength + 1) * sizeof(WCHAR));
|
(NameLength + 1) * sizeof(WCHAR));
|
||||||
if (Key->Name == NULL)
|
if (Key->Name == NULL)
|
||||||
|
@ -180,7 +180,7 @@ IniCacheAddKey(PINICACHESECTION Section,
|
||||||
Key->Name[NameLength] = 0;
|
Key->Name[NameLength] = 0;
|
||||||
|
|
||||||
|
|
||||||
Key->Data = RtlAllocateHeap(ProcessHeap,
|
Key->Data = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(DataLength + 1) * sizeof(WCHAR));
|
(DataLength + 1) * sizeof(WCHAR));
|
||||||
if (Key->Data == NULL)
|
if (Key->Data == NULL)
|
||||||
|
@ -277,7 +277,7 @@ IniCacheAddSection(PINICACHE Cache,
|
||||||
sizeof(INICACHESECTION));
|
sizeof(INICACHESECTION));
|
||||||
|
|
||||||
/* Allocate and initialize section name */
|
/* Allocate and initialize section name */
|
||||||
Section->Name = RtlAllocateHeap(ProcessHeap,
|
Section->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(NameLength + 1) * sizeof(WCHAR));
|
(NameLength + 1) * sizeof(WCHAR));
|
||||||
if (Section->Name == NULL)
|
if (Section->Name == NULL)
|
||||||
|
@ -576,7 +576,7 @@ IniCacheLoad(PINICACHE *Cache,
|
||||||
DPRINT("File size: %lu\n", FileLength);
|
DPRINT("File size: %lu\n", FileLength);
|
||||||
|
|
||||||
/* Allocate file buffer */
|
/* Allocate file buffer */
|
||||||
FileBuffer = RtlAllocateHeap(ProcessHeap,
|
FileBuffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
FileLength + 1);
|
FileLength + 1);
|
||||||
if (FileBuffer == NULL)
|
if (FileBuffer == NULL)
|
||||||
|
@ -891,7 +891,7 @@ IniCacheInsertKey(PINICACHESECTION Section,
|
||||||
sizeof(INICACHEKEY));
|
sizeof(INICACHEKEY));
|
||||||
|
|
||||||
/* Allocate name buffer */
|
/* Allocate name buffer */
|
||||||
Key->Name = RtlAllocateHeap(ProcessHeap,
|
Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(Name) + 1) * sizeof(WCHAR));
|
(wcslen(Name) + 1) * sizeof(WCHAR));
|
||||||
if (Key->Name == NULL)
|
if (Key->Name == NULL)
|
||||||
|
@ -907,7 +907,7 @@ IniCacheInsertKey(PINICACHESECTION Section,
|
||||||
wcscpy(Key->Name, Name);
|
wcscpy(Key->Name, Name);
|
||||||
|
|
||||||
/* Allocate data buffer */
|
/* Allocate data buffer */
|
||||||
Key->Data = RtlAllocateHeap(ProcessHeap,
|
Key->Data = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(Data) + 1) * sizeof(WCHAR));
|
(wcslen(Data) + 1) * sizeof(WCHAR));
|
||||||
if (Key->Data == NULL)
|
if (Key->Data == NULL)
|
||||||
|
@ -1035,7 +1035,7 @@ IniCacheSave(PINICACHE Cache,
|
||||||
DPRINT1("BufferSize: %lu\n", BufferSize);
|
DPRINT1("BufferSize: %lu\n", BufferSize);
|
||||||
|
|
||||||
/* Allocate file buffer */
|
/* Allocate file buffer */
|
||||||
Buffer = RtlAllocateHeap(ProcessHeap,
|
Buffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
BufferSize);
|
BufferSize);
|
||||||
if (Buffer == NULL)
|
if (Buffer == NULL)
|
||||||
|
@ -1153,7 +1153,7 @@ IniCacheAppendSection(PINICACHE Cache,
|
||||||
sizeof(INICACHESECTION));
|
sizeof(INICACHESECTION));
|
||||||
|
|
||||||
/* Allocate and initialize section name */
|
/* Allocate and initialize section name */
|
||||||
Section->Name = RtlAllocateHeap(ProcessHeap,
|
Section->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(Name) + 1) * sizeof(WCHAR));
|
(wcslen(Name) + 1) * sizeof(WCHAR));
|
||||||
if (Section->Name == NULL)
|
if (Section->Name == NULL)
|
||||||
|
|
|
@ -2859,9 +2859,9 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfHandle = INF_OpenBufferedFileA(InfFileData,
|
InfHandle = INF_OpenBufferedFileA((CHAR*) InfFileData,
|
||||||
InfFileSize,
|
InfFileSize,
|
||||||
NULL,
|
(const CHAR*) NULL,
|
||||||
INF_STYLE_WIN4,
|
INF_STYLE_WIN4,
|
||||||
&ErrorLine);
|
&ErrorLine);
|
||||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||||
|
@ -3518,11 +3518,11 @@ RunUSetup(VOID)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FORMAT_PARTITION_PAGE:
|
case FORMAT_PARTITION_PAGE:
|
||||||
Page = FormatPartitionPage(&Ir);
|
Page = (PAGE_NUMBER) FormatPartitionPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHECK_FILE_SYSTEM_PAGE:
|
case CHECK_FILE_SYSTEM_PAGE:
|
||||||
Page = CheckFileSystemPage(&Ir);
|
Page = (PAGE_NUMBER) CheckFileSystemPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INSTALL_DIRECTORY_PAGE:
|
case INSTALL_DIRECTORY_PAGE:
|
||||||
|
|
|
@ -194,7 +194,7 @@ WriteConsoleOutputCharacterA(
|
||||||
PCHAR pText;
|
PCHAR pText;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
Buffer = RtlAllocateHeap(
|
Buffer = (CHAR*) RtlAllocateHeap(
|
||||||
ProcessHeap,
|
ProcessHeap,
|
||||||
0,
|
0,
|
||||||
nLength + sizeof(COORD));
|
nLength + sizeof(COORD));
|
||||||
|
@ -242,7 +242,7 @@ WriteConsoleOutputCharacterW(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
Buffer = RtlAllocateHeap(
|
Buffer = (CHAR*) RtlAllocateHeap(
|
||||||
ProcessHeap,
|
ProcessHeap,
|
||||||
0,
|
0,
|
||||||
nLength + sizeof(COORD));
|
nLength + sizeof(COORD));
|
||||||
|
|
|
@ -287,7 +287,7 @@ AddPartitionToList (ULONG DiskNumber,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PartEntry->FormatState = Unknown;
|
PartEntry->FormatState = UnknownFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
InsertTailList (&DiskEntry->PartListHead,
|
InsertTailList (&DiskEntry->PartListHead,
|
||||||
|
@ -514,7 +514,7 @@ SystemConfigurationDataQueryRoutine(PWSTR ValueName,
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize % sizeof(CM_INT13_DRIVE_PARAMETER) != 0)
|
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize % sizeof(CM_INT13_DRIVE_PARAMETER) != 0)
|
||||||
continue;
|
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)
|
if (*Int13Drives == NULL)
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
memcpy(
|
memcpy(
|
||||||
|
@ -605,7 +605,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
|
||||||
DiskCount = 0;
|
DiskCount = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
BiosDiskEntry = RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
|
BiosDiskEntry = (BIOSDISKENTRY*) RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
|
||||||
if (BiosDiskEntry == NULL)
|
if (BiosDiskEntry == NULL)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -716,7 +716,7 @@ AddDiskToList (HANDLE FileHandle,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mbr = RtlAllocateHeap(ProcessHeap,
|
Mbr = (PARTITION_SECTOR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
DiskGeometry.BytesPerSector);
|
DiskGeometry.BytesPerSector);
|
||||||
|
|
||||||
|
@ -1311,7 +1311,7 @@ PrintDiskData (PPARTLIST List,
|
||||||
{
|
{
|
||||||
WriteConsoleOutputCharacterA (StdOutput,
|
WriteConsoleOutputCharacterA (StdOutput,
|
||||||
LineBuffer,
|
LineBuffer,
|
||||||
min (strlen (LineBuffer), Width - 2),
|
min ((USHORT)strlen (LineBuffer), Width - 2),
|
||||||
coPos,
|
coPos,
|
||||||
&Written);
|
&Written);
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,7 +270,7 @@ do_reg_operation(HANDLE KeyHandle,
|
||||||
|
|
||||||
if (Size)
|
if (Size)
|
||||||
{
|
{
|
||||||
Str = RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
Str = (WCHAR*) RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
||||||
if (Str == NULL)
|
if (Str == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ do_reg_operation(HANDLE KeyHandle,
|
||||||
|
|
||||||
if (Size)
|
if (Size)
|
||||||
{
|
{
|
||||||
Str = RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
Str = (WCHAR*) RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
||||||
if (Str == NULL)
|
if (Str == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ do_reg_operation(HANDLE KeyHandle,
|
||||||
|
|
||||||
if (Size)
|
if (Size)
|
||||||
{
|
{
|
||||||
Data = RtlAllocateHeap (ProcessHeap, 0, Size);
|
Data = (unsigned char*) RtlAllocateHeap (ProcessHeap, 0, Size);
|
||||||
if (Data == NULL)
|
if (Data == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ CreateComputerTypeList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
@ -308,7 +308,7 @@ GetDisplayIdentifier(PWSTR Identifier,
|
||||||
|
|
||||||
BufferLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) +
|
BufferLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) +
|
||||||
256 * sizeof(WCHAR);
|
256 * sizeof(WCHAR);
|
||||||
ValueInfo = RtlAllocateHeap(RtlGetProcessHeap(),
|
ValueInfo = (KEY_VALUE_PARTIAL_INFORMATION*) RtlAllocateHeap(RtlGetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
BufferLength);
|
BufferLength);
|
||||||
if (ValueInfo == NULL)
|
if (ValueInfo == NULL)
|
||||||
|
@ -443,7 +443,7 @@ CreateDisplayDriverList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
@ -486,7 +486,7 @@ ProcessComputerFiles(HINF InfFile, PGENERIC_LIST List, PWCHAR* AdditionalSection
|
||||||
}
|
}
|
||||||
|
|
||||||
wcscpy(SectionName, L"Files.");
|
wcscpy(SectionName, L"Files.");
|
||||||
wcscat(SectionName, Entry->UserData);
|
wcscat(SectionName, (const wchar_t*) Entry->UserData);
|
||||||
*AdditionalSectionName = SectionName;
|
*AdditionalSectionName = SectionName;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -514,7 +514,7 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SetupFindFirstLineW(InfFile, L"Display", Entry->UserData, &Context))
|
if (!SetupFindFirstLineW(InfFile, L"Display", (WCHAR*) Entry->UserData, &Context))
|
||||||
{
|
{
|
||||||
DPRINT("SetupFindFirstLineW() failed\n");
|
DPRINT("SetupFindFirstLineW() failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -637,7 +637,7 @@ CreateKeyboardDriverList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
@ -695,7 +695,7 @@ CreateKeyboardLayoutList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
|
Loading…
Reference in a new issue