[ros-diffs] [tkreuzer] 53163: [RTL] Fix MSVC warning about signed/unsigned mismatch. In this case it was not a bug, because the compiler implicitly casts to unsigned, when signed and unsigned are compared, so ...

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Wed Aug 10 13:52:31 UTC 2011


Author: tkreuzer
Date: Wed Aug 10 13:52:30 2011
New Revision: 53163

URL: http://svn.reactos.org/svn/reactos?rev=53163&view=rev
Log:
[RTL]
Fix MSVC warning about signed/unsigned mismatch. In this case it was not a bug, because the compiler implicitly casts to unsigned, when signed and unsigned are compared, so (-1 < 0x23U) is false.

Modified:
    trunk/reactos/lib/rtl/error.c

Modified: trunk/reactos/lib/rtl/error.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/error.c?rev=53163&r1=53162&r2=53163&view=diff
==============================================================================
--- trunk/reactos/lib/rtl/error.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/error.c [iso-8859-1] Wed Aug 10 13:52:30 2011
@@ -56,8 +56,8 @@
 
     while (table->start)
     {
-        if (status < table->start) break;
-        if (status < table->end)
+        if ((ULONG)status < table->start) break;
+        if ((ULONG)status < table->end)
         {
             DWORD ret = table->table[status - table->start];
             /* unknown entries are 0 */




More information about the Ros-diffs mailing list