mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
- Fix most of the warnings in mkhive.
svn path=/trunk/; revision=37613
This commit is contained in:
parent
cfeeca424d
commit
7da3ae674b
|
@ -622,7 +622,7 @@ CmiAllocateValueCell(
|
|||
|
||||
NameLength = CmiGetPackedNameLength(ValueName, &Packable);
|
||||
|
||||
DPRINT("ValueName->Length %lu NameLength %lu\n", ValueName->Length, NameLength);
|
||||
DPRINT("ValueName->Length %u NameLength %u\n", ValueName->Length, NameLength);
|
||||
|
||||
*VBOffset = HvAllocateCell(&RegistryHive->Hive, sizeof(CM_KEY_VALUE) + NameLength, Storage, HCELL_NIL);
|
||||
if (*VBOffset == HCELL_NIL)
|
||||
|
|
|
@ -158,7 +158,7 @@ AppendMultiSzValue (
|
|||
ValueName,
|
||||
0,
|
||||
REG_MULTI_SZ,
|
||||
(PCHAR)Buffer,
|
||||
(PUCHAR)Buffer,
|
||||
(ULONG)Total);
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ do_reg_operation(
|
|||
{
|
||||
ULONG dw = Str ? strtoul (Str, NULL, 0) : 0;
|
||||
|
||||
DPRINT("setting dword %s to %lx\n", ValueName, dw);
|
||||
DPRINT("setting dword %s to %x\n", ValueName, dw);
|
||||
|
||||
RegSetValueExA (
|
||||
KeyHandle,
|
||||
|
@ -343,7 +343,7 @@ do_reg_operation(
|
|||
}
|
||||
else /* get the binary data */
|
||||
{
|
||||
PCHAR Data = NULL;
|
||||
PUCHAR Data = NULL;
|
||||
|
||||
if (InfHostGetBinaryField (Context, 5, NULL, 0, &Size) != 0)
|
||||
Size = 0;
|
||||
|
@ -354,8 +354,8 @@ do_reg_operation(
|
|||
if (Data == NULL)
|
||||
return FALSE;
|
||||
|
||||
DPRINT("setting binary data %s len %lu\n", ValueName, Size);
|
||||
InfHostGetBinaryField (Context, 5, Data, (ULONG)Size, NULL);
|
||||
DPRINT("setting binary data %s len %d\n", ValueName, Size);
|
||||
InfHostGetBinaryField (Context, 5, Data, Size, NULL);
|
||||
}
|
||||
|
||||
RegSetValueExA (
|
||||
|
@ -416,11 +416,11 @@ registry_callback (HINF hInf, PCHAR Section, BOOL Delete)
|
|||
else
|
||||
{
|
||||
/* get flags */
|
||||
if (InfHostGetIntField (Context, 4, (PLONG)&Flags) != 0)
|
||||
if (InfHostGetIntField (Context, 4, &Flags) != 0)
|
||||
Flags = 0;
|
||||
}
|
||||
|
||||
DPRINT("Flags: %lx\n", Flags);
|
||||
DPRINT("Flags: 0x%x\n", Flags);
|
||||
|
||||
if (Delete || (Flags & FLG_ADDREG_OVERWRITEONLY))
|
||||
{
|
||||
|
|
|
@ -384,7 +384,7 @@ RegSetValueExW(
|
|||
if (cbData <= sizeof(HCELL_INDEX))
|
||||
{
|
||||
/* If data size <= sizeof(HCELL_INDEX) then store data in the data offset */
|
||||
DPRINT("ValueCell->DataLength %lu\n", ValueCell->DataLength);
|
||||
DPRINT("ValueCell->DataLength %u\n", ValueCell->DataLength);
|
||||
if (DataCell)
|
||||
HvFreeCell(&Key->RegistryHive->Hive, ValueCell->Data);
|
||||
|
||||
|
@ -401,12 +401,12 @@ RegSetValueExW(
|
|||
* data block and allocate a new one. */
|
||||
HCELL_INDEX NewOffset;
|
||||
|
||||
DPRINT("ValueCell->DataLength %lu\n", ValueCell->DataLength);
|
||||
DPRINT("ValueCell->DataLength %u\n", ValueCell->DataLength);
|
||||
|
||||
NewOffset = HvAllocateCell(&Key->RegistryHive->Hive, cbData, Stable, HCELL_NIL);
|
||||
if (NewOffset == HCELL_NIL)
|
||||
{
|
||||
DPRINT("HvAllocateCell() failed with status 0x%08lx\n", Status);
|
||||
DPRINT("HvAllocateCell() failed with status 0x%08x\n", Status);
|
||||
return ERROR_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -427,7 +427,7 @@ RegSetValueExW(
|
|||
|
||||
HvMarkCellDirty(&Key->RegistryHive->Hive, Key->KeyCellOffset, FALSE);
|
||||
|
||||
DPRINT("Return status 0x%08lx\n", Status);
|
||||
DPRINT("Return status 0x%08x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ ConnectRegistry(
|
|||
Status = CmiInitializeTempHive(HiveToConnect);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("CmiInitializeTempHive() failed with status 0x%08lx\n", Status);
|
||||
DPRINT1("CmiInitializeTempHive() failed with status 0x%08x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -599,29 +599,6 @@ ConnectRegistry(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL
|
||||
MyExportBinaryHive (PCHAR FileName,
|
||||
PCMHIVE RootHive)
|
||||
{
|
||||
FILE *File;
|
||||
BOOL ret;
|
||||
|
||||
/* Create new hive file */
|
||||
File = fopen (FileName, "w+b");
|
||||
if (File == NULL)
|
||||
{
|
||||
printf(" Error creating/opening file\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fseek (File, 0, SEEK_SET);
|
||||
|
||||
RootHive->FileHandles[HFILE_TYPE_PRIMARY] = (HANDLE)File;
|
||||
ret = HvWriteHive(&RootHive->Hive);
|
||||
fclose (File);
|
||||
return ret;
|
||||
}
|
||||
|
||||
LIST_ENTRY CmiHiveListHead;
|
||||
|
||||
VOID
|
||||
|
@ -636,7 +613,7 @@ RegInitializeRegistry(VOID)
|
|||
Status = CmiInitializeTempHive(&RootHive);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("CmiInitializeTempHive() failed with status 0x%08lx\n", Status);
|
||||
DPRINT1("CmiInitializeTempHive() failed with status 0x%08x\n", Status);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue