Author: cwittich
Date: Fri Jan 5 23:19:21 2007
New Revision: 25315
URL:
http://svn.reactos.org/svn/reactos?rev=25315&view=rev
Log:
* fixed a bug in AddPartitionToList (value must be of type FORMATSTATE instead of
MEDIA_TYPE
* fixed some warnings
Modified:
trunk/reactos/base/setup/usetup/filequeue.c
trunk/reactos/base/setup/usetup/inicache.c
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/native/utils/console.c
trunk/reactos/base/setup/usetup/partlist.c
trunk/reactos/base/setup/usetup/registry.c
trunk/reactos/base/setup/usetup/settings.c
Modified: trunk/reactos/base/setup/usetup/filequeue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/filequeu…
==============================================================================
--- trunk/reactos/base/setup/usetup/filequeue.c (original)
+++ trunk/reactos/base/setup/usetup/filequeue.c Fri Jan 5 23:19:21 2007
@@ -170,7 +170,7 @@
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 @@
/* 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 @@
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 @@
/* 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 @@
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 @@
if (TargetFilename != NULL)
{
Length = wcslen(TargetFilename);
- Entry->TargetFilename = RtlAllocateHeap(ProcessHeap,
+ Entry->TargetFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(Length + 1) * sizeof(WCHAR));
if (Entry->TargetFilename == NULL)
Modified: trunk/reactos/base/setup/usetup/inicache.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/inicache…
==============================================================================
--- trunk/reactos/base/setup/usetup/inicache.c (original)
+++ trunk/reactos/base/setup/usetup/inicache.c Fri Jan 5 23:19:21 2007
@@ -160,7 +160,7 @@
sizeof(INICACHEKEY));
- Key->Name = RtlAllocateHeap(ProcessHeap,
+ Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(NameLength + 1) * sizeof(WCHAR));
if (Key->Name == NULL)
@@ -180,7 +180,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
DPRINT1("BufferSize: %lu\n", BufferSize);
/* Allocate file buffer */
- Buffer = RtlAllocateHeap(ProcessHeap,
+ Buffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
0,
BufferSize);
if (Buffer == NULL)
@@ -1153,7 +1153,7 @@
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)
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c Fri Jan 5 23:19:21 2007
@@ -753,7 +753,7 @@
{
return LICENSE_PAGE;
break;
- }
+ }
}
return INTRO_PAGE;
@@ -815,7 +815,7 @@
CONSOLE_SetTextXY(6, 12, "The repair functions are not implemented yet.");
CONSOLE_SetTextXY(8, 15, "\x07 Press R for the Recovery Console.");
-
+
CONSOLE_SetTextXY(8, 17, "\x07 Press ESC to return to the main page.");
CONSOLE_SetTextXY(8, 19, "\x07 Press ENTER to reboot your computer.");
@@ -2806,7 +2806,7 @@
Ir, POPUP_WAIT_ENTER);
return(QUIT_PAGE);
}
-
+
if (!PrepareCopyPageInfFile(SetupInf, NULL, Ir))
{
return QUIT_PAGE;
@@ -2859,9 +2859,9 @@
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)
@@ -3156,12 +3156,12 @@
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
{
CONSOLE_NormalTextXY (8, Line, 48, 1);
-
+
Line++;
if (Line<12) Line=14;
if (Line>14) Line=12;
-
-
+
+
CONSOLE_InvertTextXY (8, Line, 48, 1);
}
@@ -3169,7 +3169,7 @@
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP)) /* UP */
{
CONSOLE_NormalTextXY (8, Line, 48, 1);
-
+
Line--;
if (Line<12) Line=14;
if (Line>14) Line=12;
@@ -3518,11 +3518,11 @@
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:
Modified: trunk/reactos/base/setup/usetup/native/utils/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/native/u…
==============================================================================
--- trunk/reactos/base/setup/usetup/native/utils/console.c (original)
+++ trunk/reactos/base/setup/usetup/native/utils/console.c Fri Jan 5 23:19:21 2007
@@ -194,7 +194,7 @@
PCHAR pText;
NTSTATUS Status;
- Buffer = RtlAllocateHeap(
+ Buffer = (CHAR*) RtlAllocateHeap(
ProcessHeap,
0,
nLength + sizeof(COORD));
@@ -242,7 +242,7 @@
NTSTATUS Status;
ULONG i;
- Buffer = RtlAllocateHeap(
+ Buffer = (CHAR*) RtlAllocateHeap(
ProcessHeap,
0,
nLength + sizeof(COORD));
Modified: trunk/reactos/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.c (original)
+++ trunk/reactos/base/setup/usetup/partlist.c Fri Jan 5 23:19:21 2007
@@ -287,7 +287,7 @@
}
else
{
- PartEntry->FormatState = Unknown;
+ PartEntry->FormatState = UnknownFormat;
}
InsertTailList (&DiskEntry->PartListHead,
@@ -514,7 +514,7 @@
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(
@@ -567,7 +567,7 @@
{
break;
}
-
+
swprintf(Name, L"%s\\%lu\\DiskController", ROOT_NAME, AdapterCount);
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
Name,
@@ -589,7 +589,7 @@
RtlFreeHeap(ProcessHeap, 0, Int13Drives);
return;
}
-
+
swprintf(Name, L"%s\\%lu\\DiskController\\0\\DiskPeripheral",
ROOT_NAME, AdapterCount);
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
Name,
@@ -605,7 +605,7 @@
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 @@
return;
}
- Mbr = RtlAllocateHeap(ProcessHeap,
+ Mbr = (PARTITION_SECTOR*) RtlAllocateHeap(ProcessHeap,
0,
DiskGeometry.BytesPerSector);
@@ -724,7 +724,7 @@
{
return;
}
-
+
FileOffset.QuadPart = 0;
Status = NtReadFile(FileHandle,
NULL,
@@ -785,7 +785,7 @@
/* FIXME:
* Compare the size from bios and the reported size from driver.
* If we have more than one disk with a zero or with the same signatur
- * we must create new signatures and reboot. After the reboot,
+ * we must create new signatures and reboot. After the reboot,
* it is possible to identify the disks.
*/
if (BiosDiskEntry->Signature == Signature &&
@@ -1036,7 +1036,7 @@
{
Entry = RemoveHeadList(&List->BiosDiskListHead);
BiosDiskEntry = CONTAINING_RECORD(Entry, BIOSDISKENTRY, ListEntry);
-
+
RtlFreeHeap(ProcessHeap, 0, BiosDiskEntry);
}
@@ -1311,7 +1311,7 @@
{
WriteConsoleOutputCharacterA (StdOutput,
LineBuffer,
- min (strlen (LineBuffer), Width - 2),
+ min ((USHORT)strlen (LineBuffer), Width - 2),
coPos,
&Written);
}
@@ -2380,7 +2380,7 @@
else
{
DriveLayout->PartitionCount = PartitionCount;
-
+
Index = 0;
Entry2 = DiskEntry1->PartListHead.Flink;
while (Entry2 != &DiskEntry1->PartListHead)
@@ -2423,7 +2423,7 @@
/* check if the signature already exist */
/* FIXME:
- * Check also signatures from disks, which are
+ * Check also signatures from disks, which are
* not visible (bootable) by the bios.
*/
Entry2 = List->DiskListHead.Flink;
@@ -2442,7 +2442,7 @@
break;
}
}
-
+
/* set one partition entry to dirty, this will update the signature */
DriveLayout->PartitionEntry[0].RewritePartition = TRUE;
@@ -2466,7 +2466,7 @@
FILE_ALL_ACCESS,
&ObjectAttributes,
&Iosb,
- 0,
+ 0,
FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS (Status))
Modified: trunk/reactos/base/setup/usetup/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/registry…
==============================================================================
--- trunk/reactos/base/setup/usetup/registry.c (original)
+++ trunk/reactos/base/setup/usetup/registry.c Fri Jan 5 23:19:21 2007
@@ -270,7 +270,7 @@
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 @@
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 @@
if (Size)
{
- Data = RtlAllocateHeap (ProcessHeap, 0, Size);
+ Data = (unsigned char*) RtlAllocateHeap (ProcessHeap, 0, Size);
if (Data == NULL)
return FALSE;
@@ -659,7 +659,7 @@
HANDLE KeyHandle;
NTSTATUS Status;
- /* Create the 'secret' InstallPath key */
+ /* Create the 'secret' InstallPath key */
InitializeObjectAttributes (&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
@@ -703,7 +703,7 @@
swprintf(ValueNameBuffer, L"\\DosDevices\\%C:", Letter);
RtlInitUnicodeString(&ValueName, ValueNameBuffer);
-
+
InitializeObjectAttributes (&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
@@ -714,7 +714,7 @@
&ObjectAttributes);
if (!NT_SUCCESS(Status))
{
- Status = NtCreateKey(&KeyHandle,
+ Status = NtCreateKey(&KeyHandle,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
Modified: trunk/reactos/base/setup/usetup/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/settings…
==============================================================================
--- trunk/reactos/base/setup/usetup/settings.c (original)
+++ trunk/reactos/base/setup/usetup/settings.c Fri Jan 5 23:19:21 2007
@@ -187,7 +187,7 @@
break;
}
- UserData = RtlAllocateHeap(ProcessHeap,
+ UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)
@@ -308,7 +308,7 @@
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 @@
break;
}
- UserData = RtlAllocateHeap(ProcessHeap,
+ UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)
@@ -486,7 +486,7 @@
}
wcscpy(SectionName, L"Files.");
- wcscat(SectionName, Entry->UserData);
+ wcscat(SectionName, (const wchar_t*) Entry->UserData);
*AdditionalSectionName = SectionName;
return TRUE;
@@ -514,7 +514,7 @@
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;
@@ -554,7 +554,7 @@
}
Width = wcstoul(Buffer, NULL, 10);
Status = RtlWriteRegistryValue(RTL_REGISTRY_ABSOLUTE,
- RegPath,
+ RegPath,
L"DefaultSettings.XResolution",
REG_DWORD,
&Width,
@@ -565,7 +565,7 @@
return FALSE;
}
-
+
if (!INF_GetDataField(&Context, 5, &Buffer))
{
DPRINT("INF_GetDataField() failed\n");
@@ -637,7 +637,7 @@
break;
}
- UserData = RtlAllocateHeap(ProcessHeap,
+ UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)
@@ -695,7 +695,7 @@
break;
}
- UserData = RtlAllocateHeap(ProcessHeap,
+ UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
0,
(wcslen(KeyName) + 1) * sizeof(WCHAR));
if (UserData == NULL)