Silence compiler warnings (6/11).

svn path=/trunk/; revision=37828
This commit is contained in:
Dmitry Gorbachev 2008-12-03 17:32:36 +00:00
parent 620e4cad34
commit 120359ef8e
8 changed files with 16 additions and 16 deletions

View file

@ -46,7 +46,7 @@ __do_global_ctors (void)
* is terminated with a null entry. Otherwise the first entry was * is terminated with a null entry. Otherwise the first entry was
* the number of pointers in the list. * the number of pointers in the list.
*/ */
if (nptrs == -1) if (nptrs == (unsigned long) -1)
{ {
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++); for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);
} }

View file

@ -9,7 +9,7 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
static PHCELL __inline CMAPI static __inline PHCELL CMAPI
HvpGetCellHeader( HvpGetCellHeader(
PHHIVE RegistryHive, PHHIVE RegistryHive,
HCELL_INDEX CellIndex) HCELL_INDEX CellIndex)
@ -74,7 +74,7 @@ HvGetCell(
return (PVOID)(HvpGetCellHeader(RegistryHive, CellIndex) + 1); return (PVOID)(HvpGetCellHeader(RegistryHive, CellIndex) + 1);
} }
static LONG __inline CMAPI static __inline LONG CMAPI
HvpGetCellFullSize( HvpGetCellFullSize(
PHHIVE RegistryHive, PHHIVE RegistryHive,
PVOID Cell) PVOID Cell)
@ -141,7 +141,7 @@ HvIsCellDirty(IN PHHIVE Hive,
return IsDirty; return IsDirty;
} }
static ULONG __inline CMAPI static __inline ULONG CMAPI
HvpComputeFreeListIndex( HvpComputeFreeListIndex(
ULONG Size) ULONG Size)
{ {
@ -424,7 +424,7 @@ HvReallocateCell(
* FIXME: Merge with adjacent free cell if possible. * FIXME: Merge with adjacent free cell if possible.
* FIXME: Implement shrinking. * FIXME: Implement shrinking.
*/ */
if (Size > OldCellSize) if (Size > (ULONG)OldCellSize)
{ {
NewCellIndex = HvAllocateCell(RegistryHive, Size, Storage, HCELL_NIL); NewCellIndex = HvAllocateCell(RegistryHive, Size, Storage, HCELL_NIL);
if (NewCellIndex == HCELL_NIL) if (NewCellIndex == HCELL_NIL)

View file

@ -80,7 +80,7 @@ typedef ULONG HCELL_INDEX, *PHCELL_INDEX;
// //
// Cell Magic Values // Cell Magic Values
// //
#define HCELL_NIL -1 #define HCELL_NIL -1U
#define HCELL_CACHED 1 #define HCELL_CACHED 1
#define HCELL_TYPE_MASK 0x80000000 #define HCELL_TYPE_MASK 0x80000000

View file

@ -79,7 +79,7 @@ HvpWriteLog(
{ {
LastIndex = BlockIndex; LastIndex = BlockIndex;
BlockIndex = RtlFindSetBits(&RegistryHive->DirtyVector, 1, BlockIndex); BlockIndex = RtlFindSetBits(&RegistryHive->DirtyVector, 1, BlockIndex);
if (BlockIndex == ~0 || BlockIndex < LastIndex) if (BlockIndex == ~0U || BlockIndex < LastIndex)
{ {
break; break;
} }
@ -182,7 +182,7 @@ HvpWriteHive(
{ {
LastIndex = BlockIndex; LastIndex = BlockIndex;
BlockIndex = RtlFindSetBits(&RegistryHive->DirtyVector, 1, BlockIndex); BlockIndex = RtlFindSetBits(&RegistryHive->DirtyVector, 1, BlockIndex);
if (BlockIndex == ~0 || BlockIndex < LastIndex) if (BlockIndex == ~0U || BlockIndex < LastIndex)
{ {
break; break;
} }
@ -239,7 +239,7 @@ HvSyncHive(
{ {
ASSERT(RegistryHive->ReadOnly == FALSE); ASSERT(RegistryHive->ReadOnly == FALSE);
if (RtlFindSetBits(&RegistryHive->DirtyVector, 1, 0) == ~0) if (RtlFindSetBits(&RegistryHive->DirtyVector, 1, 0) == ~0U)
{ {
return TRUE; return TRUE;
} }

View file

@ -150,8 +150,7 @@ VOID IPDispatchProtocol(
Protocol = 0; Protocol = 0;
} }
if (Protocol < IP_PROTOCOL_TABLE_SIZE && if (Protocol < IP_PROTOCOL_TABLE_SIZE)
Protocol >= 0)
{ {
/* Call the appropriate protocol handler */ /* Call the appropriate protocol handler */
(*ProtocolTable[Protocol])(Interface, IPPacket); (*ProtocolTable[Protocol])(Interface, IPPacket);

View file

@ -61,7 +61,8 @@ vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix,
EXCEPTION_RECORD ExceptionRecord; EXCEPTION_RECORD ExceptionRecord;
/* Check if we should print it or not */ /* Check if we should print it or not */
if ((ComponentId != -1) && !(NtQueryDebugFilterState(ComponentId, Level))) if ((ComponentId != -1U) &&
!(NtQueryDebugFilterState(ComponentId, Level)))
{ {
/* This message is masked */ /* This message is masked */
return Status; return Status;
@ -96,7 +97,7 @@ vDbgPrintExWithPrefixInternal(IN LPCSTR Prefix,
if (!NT_SUCCESS(Status)) return Status; if (!NT_SUCCESS(Status)) return Status;
/* Check if we went past the buffer */ /* Check if we went past the buffer */
if (Length == -1) if (Length == -1U)
{ {
/* Terminate it if we went over-board */ /* Terminate it if we went over-board */
Buffer[sizeof(Buffer) - 1] = '\n'; Buffer[sizeof(Buffer) - 1] = '\n';

View file

@ -255,7 +255,7 @@ void * CDECL _aligned_offset_realloc(void *memblock, size_t size,
/* Get previous size of block */ /* Get previous size of block */
old_size = _msize(*saved); old_size = _msize(*saved);
if (old_size == -1) if (old_size == (size_t)-1)
{ {
/* It seems this function was called with an invalid pointer. Bail out. */ /* It seems this function was called with an invalid pointer. Bail out. */
return NULL; return NULL;

View file

@ -36,7 +36,7 @@ SmLookupSubsystem (IN PWSTR Name,
IN PVOID Environment OPTIONAL) IN PVOID Environment OPTIONAL)
{ {
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
UNICODE_STRING usKeyName = {0}; UNICODE_STRING usKeyName = { 0, 0, NULL };
OBJECT_ATTRIBUTES Oa = {0}; OBJECT_ATTRIBUTES Oa = {0};
HANDLE hKey = (HANDLE) 0; HANDLE hKey = (HANDLE) 0;
@ -62,7 +62,7 @@ SmLookupSubsystem (IN PWSTR Name,
& Oa); & Oa);
if(NT_SUCCESS(Status)) if(NT_SUCCESS(Status))
{ {
UNICODE_STRING usValueName = {0}; UNICODE_STRING usValueName = { 0, 0, NULL };
PWCHAR KeyValueInformation = NULL; PWCHAR KeyValueInformation = NULL;
ULONG KeyValueInformationLength = 1024; ULONG KeyValueInformationLength = 1024;
ULONG ResultLength = 0L; ULONG ResultLength = 0L;