[ros-diffs] [dgorbachev] 37828: Silence compiler warnings (6/11).

dgorbachev at svn.reactos.org dgorbachev at svn.reactos.org
Wed Dec 3 18:32:37 CET 2008


Author: dgorbachev
Date: Wed Dec  3 11:32:36 2008
New Revision: 37828

URL: http://svn.reactos.org/svn/reactos?rev=37828&view=rev
Log:
Silence compiler warnings (6/11).

Modified:
    trunk/reactos/lib/3rdparty/mingw/gccmain.c
    trunk/reactos/lib/cmlib/hivecell.c
    trunk/reactos/lib/cmlib/hivedata.h
    trunk/reactos/lib/cmlib/hivewrt.c
    trunk/reactos/lib/drivers/ip/network/ip.c
    trunk/reactos/lib/rtl/debug.c
    trunk/reactos/lib/sdk/crt/wine/heap.c
    trunk/reactos/lib/smlib/lookupss.c

Modified: trunk/reactos/lib/3rdparty/mingw/gccmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/gccmain.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/3rdparty/mingw/gccmain.c [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/mingw/gccmain.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -46,7 +46,7 @@
    * is terminated with a null entry. Otherwise the first entry was
    * the number of pointers in the list.
    */
-  if (nptrs == -1)
+  if (nptrs == (unsigned long) -1)
     {
       for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);
     }

Modified: trunk/reactos/lib/cmlib/hivecell.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivecell.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/cmlib/hivecell.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hivecell.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -9,7 +9,7 @@
 #define NDEBUG
 #include <debug.h>
 
-static PHCELL __inline CMAPI
+static __inline PHCELL CMAPI
 HvpGetCellHeader(
    PHHIVE RegistryHive,
    HCELL_INDEX CellIndex)
@@ -74,7 +74,7 @@
    return (PVOID)(HvpGetCellHeader(RegistryHive, CellIndex) + 1);
 }
 
-static LONG __inline CMAPI
+static __inline LONG CMAPI
 HvpGetCellFullSize(
    PHHIVE RegistryHive,
    PVOID Cell)
@@ -141,7 +141,7 @@
    return IsDirty;
 }
 
-static ULONG __inline CMAPI
+static __inline ULONG CMAPI
 HvpComputeFreeListIndex(
    ULONG Size)
 {
@@ -424,7 +424,7 @@
     * FIXME: Merge with adjacent free cell if possible.
     * FIXME: Implement shrinking.
     */
-   if (Size > OldCellSize)
+   if (Size > (ULONG)OldCellSize)
    {
       NewCellIndex = HvAllocateCell(RegistryHive, Size, Storage, HCELL_NIL);
       if (NewCellIndex == HCELL_NIL)

Modified: trunk/reactos/lib/cmlib/hivedata.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivedata.h?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/cmlib/hivedata.h [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hivedata.h [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -80,7 +80,7 @@
 //
 // Cell Magic Values
 //
-#define HCELL_NIL                                       -1
+#define HCELL_NIL                                       -1U
 #define HCELL_CACHED                                    1
 
 #define HCELL_TYPE_MASK                0x80000000

Modified: trunk/reactos/lib/cmlib/hivewrt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivewrt.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -79,7 +79,7 @@
    {
       LastIndex = BlockIndex;
       BlockIndex = RtlFindSetBits(&RegistryHive->DirtyVector, 1, BlockIndex);
-      if (BlockIndex == ~0 || BlockIndex < LastIndex)
+      if (BlockIndex == ~0U || BlockIndex < LastIndex)
       {
          break;
       }
@@ -182,7 +182,7 @@
       {
          LastIndex = BlockIndex;
          BlockIndex = RtlFindSetBits(&RegistryHive->DirtyVector, 1, BlockIndex);
-         if (BlockIndex == ~0 || BlockIndex < LastIndex)
+         if (BlockIndex == ~0U || BlockIndex < LastIndex)
          {
             break;
          }
@@ -239,7 +239,7 @@
 {
    ASSERT(RegistryHive->ReadOnly == FALSE);
 
-   if (RtlFindSetBits(&RegistryHive->DirtyVector, 1, 0) == ~0)
+   if (RtlFindSetBits(&RegistryHive->DirtyVector, 1, 0) == ~0U)
    {
       return TRUE;
    }

Modified: trunk/reactos/lib/drivers/ip/network/ip.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/ip.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -150,8 +150,7 @@
         Protocol = 0;
     }
 
-    if (Protocol < IP_PROTOCOL_TABLE_SIZE &&
-        Protocol >= 0)
+    if (Protocol < IP_PROTOCOL_TABLE_SIZE)
     {
        /* Call the appropriate protocol handler */
        (*ProtocolTable[Protocol])(Interface, IPPacket);

Modified: trunk/reactos/lib/rtl/debug.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/rtl/debug.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/debug.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -61,7 +61,8 @@
     EXCEPTION_RECORD ExceptionRecord;
 
     /* Check if we should print it or not */
-    if ((ComponentId != -1) && !(NtQueryDebugFilterState(ComponentId, Level)))
+    if ((ComponentId != -1U) &&
+        !(NtQueryDebugFilterState(ComponentId, Level)))
     {
         /* This message is masked */
         return Status;
@@ -96,7 +97,7 @@
     if (!NT_SUCCESS(Status)) return Status;
 
     /* Check if we went past the buffer */
-    if (Length == -1)
+    if (Length == -1U)
     {
         /* Terminate it if we went over-board */
         Buffer[sizeof(Buffer) - 1] = '\n';

Modified: trunk/reactos/lib/sdk/crt/wine/heap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/wine/heap.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/sdk/crt/wine/heap.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/wine/heap.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -255,7 +255,7 @@
 
     /* Get previous size of block */
     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. */
         return NULL;

Modified: trunk/reactos/lib/smlib/lookupss.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/smlib/lookupss.c?rev=37828&r1=37827&r2=37828&view=diff
==============================================================================
--- trunk/reactos/lib/smlib/lookupss.c [iso-8859-1] (original)
+++ trunk/reactos/lib/smlib/lookupss.c [iso-8859-1] Wed Dec  3 11:32:36 2008
@@ -36,7 +36,7 @@
 		   IN     PVOID   Environment OPTIONAL)
 {
 	NTSTATUS           Status = STATUS_SUCCESS;
-	UNICODE_STRING     usKeyName = {0};
+	UNICODE_STRING     usKeyName = { 0, 0, NULL };
 	OBJECT_ATTRIBUTES  Oa = {0};
 	HANDLE             hKey = (HANDLE) 0;
 
@@ -62,7 +62,7 @@
 			      & Oa);
 	if(NT_SUCCESS(Status))
 	{
-		UNICODE_STRING usValueName = {0};
+		UNICODE_STRING usValueName = { 0, 0, NULL };
 		PWCHAR         KeyValueInformation = NULL;
 		ULONG          KeyValueInformationLength = 1024;
 		ULONG          ResultLength = 0L;



More information about the Ros-diffs mailing list