mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Fix some warnings
svn path=/trunk/; revision=24025
This commit is contained in:
parent
aafcd436d5
commit
2ca81c5573
4 changed files with 15 additions and 15 deletions
|
@ -31,7 +31,7 @@ CMLIB_HOST_OBJECTS = \
|
|||
$(subst $(CMLIB_BASE), $(CMLIB_INT), $(CMLIB_HOST_SOURCES:.c=.o))
|
||||
|
||||
CMLIB_HOST_CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
|
||||
-D_X86_ -D__i386__ -D_REACTOS_ \
|
||||
-D_X86_ -D__i386__ -D_REACTOS_ -D_NTOSKRNL_\
|
||||
-DCMLIB_HOST -D_M_IX86 -I$(CMLIB_BASE) -Iinclude/reactos -Iinclude/psdk -Iinclude/ddk \
|
||||
-D__NO_CTYPE_INLINES
|
||||
|
||||
|
|
|
@ -24,17 +24,17 @@ HvpAddBin(
|
|||
PHCELL Block;
|
||||
|
||||
BinSize = ROUND_UP(Size + sizeof(HBIN), HV_BLOCK_SIZE);
|
||||
BlockCount = BinSize / HV_BLOCK_SIZE;
|
||||
BlockCount = (ULONG)(BinSize / HV_BLOCK_SIZE);
|
||||
|
||||
Bin = RegistryHive->Allocate(BinSize, TRUE);
|
||||
if (Bin == NULL)
|
||||
return NULL;
|
||||
RtlZeroMemory(Bin, sizeof(HBIN));
|
||||
RtlZeroMemory(Bin, BinSize);
|
||||
|
||||
Bin->Signature = HV_BIN_SIGNATURE;
|
||||
Bin->FileOffset = RegistryHive->Storage[Storage].Length *
|
||||
HV_BLOCK_SIZE;
|
||||
Bin->Size = BinSize;
|
||||
Bin->Size = (ULONG)BinSize;
|
||||
|
||||
/* Allocate new block list */
|
||||
OldBlockListSize = RegistryHive->Storage[Storage].Length;
|
||||
|
@ -65,7 +65,7 @@ HvpAddBin(
|
|||
|
||||
/* Initialize a free block in this heap. */
|
||||
Block = (PHCELL)(Bin + 1);
|
||||
Block->Size = BinSize - sizeof(HBIN);
|
||||
Block->Size = (LONG)(BinSize - sizeof(HBIN));
|
||||
|
||||
if (Storage == HvStable)
|
||||
{
|
||||
|
|
|
@ -202,7 +202,7 @@ HvpFindFree(
|
|||
while (*pFreeCellOffset != HCELL_NULL)
|
||||
{
|
||||
FreeCellData = (PHCELL_INDEX)HvGetCell(RegistryHive, *pFreeCellOffset);
|
||||
if (HvpGetCellFullSize(RegistryHive, FreeCellData) >= Size)
|
||||
if ((ULONG)HvpGetCellFullSize(RegistryHive, FreeCellData) >= Size)
|
||||
{
|
||||
FreeCellOffset = *pFreeCellOffset;
|
||||
*pFreeCellOffset = *FreeCellData;
|
||||
|
@ -299,7 +299,7 @@ HvAllocateCell(
|
|||
|
||||
/* Split the block in two parts */
|
||||
/* FIXME: There is some minimal cell size that we must respect. */
|
||||
if (FreeCell->Size > Size + sizeof(HCELL_INDEX))
|
||||
if ((ULONG)FreeCell->Size > Size + sizeof(HCELL_INDEX))
|
||||
{
|
||||
NewCell = (PHCELL)((ULONG_PTR)FreeCell + Size);
|
||||
NewCell->Size = FreeCell->Size - Size;
|
||||
|
@ -344,7 +344,7 @@ HvReallocateCell(
|
|||
* FIXME: Merge with adjacent free cell if possible.
|
||||
* FIXME: Implement shrinking.
|
||||
*/
|
||||
if (Size > -OldCellSize)
|
||||
if (Size > (ULONG)-OldCellSize)
|
||||
{
|
||||
NewCellIndex = HvAllocateCell(RegistryHive, Size, Storage);
|
||||
if (NewCellIndex == HCELL_NULL)
|
||||
|
@ -393,8 +393,8 @@ HvFreeCell(
|
|||
if (Neighbor->Size > 0)
|
||||
{
|
||||
HvpRemoveFree(RegistryHive, Neighbor,
|
||||
((HCELL_INDEX)Neighbor - (HCELL_INDEX)Bin +
|
||||
Bin->FileOffset) | (CellIndex & HCELL_TYPE_MASK));
|
||||
((HCELL_INDEX)((ULONG_PTR)Neighbor - (ULONG_PTR)Bin +
|
||||
Bin->FileOffset)) | (CellIndex & HCELL_TYPE_MASK));
|
||||
Free->Size += Neighbor->Size;
|
||||
}
|
||||
}
|
||||
|
@ -409,8 +409,8 @@ HvFreeCell(
|
|||
Neighbor->Size += Free->Size;
|
||||
if (CellType == HvStable)
|
||||
HvMarkCellDirty(RegistryHive,
|
||||
(HCELL_INDEX)Neighbor - (HCELL_INDEX)Bin +
|
||||
Bin->FileOffset);
|
||||
(HCELL_INDEX)((ULONG_PTR)Neighbor - (ULONG_PTR)Bin +
|
||||
Bin->FileOffset));
|
||||
return;
|
||||
}
|
||||
Neighbor = (PHCELL)((ULONG_PTR)Neighbor + Neighbor->Size);
|
||||
|
|
|
@ -874,7 +874,7 @@ RtlTestBit(PRTL_BITMAP BitMapHeader,
|
|||
|
||||
Ptr = (PULONG)BitMapHeader->Buffer + (BitNumber / 32);
|
||||
|
||||
return (*Ptr & (1 << (BitNumber % 32)));
|
||||
return (BOOLEAN)(*Ptr & (1 << (BitNumber % 32)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -923,7 +923,7 @@ CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG ulLong)
|
|||
signed char ret = 32;
|
||||
DWORD dw;
|
||||
|
||||
if (!(dw = (ulLong >> 32)))
|
||||
if (!(dw = (DWORD)(ulLong >> 32)))
|
||||
{
|
||||
ret = 0;
|
||||
dw = (DWORD)ulLong;
|
||||
|
@ -957,7 +957,7 @@ CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG ulLong)
|
|||
if (!(dw = (DWORD)ulLong))
|
||||
{
|
||||
ret = 32;
|
||||
if (!(dw = ulLong >> 32)) return -1;
|
||||
if (!(dw = (DWORD)(ulLong >> 32))) return -1;
|
||||
}
|
||||
if (!(dw & 0xffff))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue