kernel32: Avoid signed-unsigned integer comparisons

Andrew Talbot andrew.talbot at talbotville.com
Mon Feb 11 16:44:12 CST 2013


Changelog:
    kernel32: Avoid signed-unsigned integer comparisons

diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c
index 528ba76..ae1eaa3 100644
--- a/dlls/kernel32/debugger.c
+++ b/dlls/kernel32/debugger.c
@@ -51,7 +51,7 @@ BOOL WINAPI WaitForDebugEvent(
     DWORD         timeout)
 {
     BOOL ret;
-    DWORD i, res;
+    DWORD res;
 
     for (;;)
     {
@@ -81,8 +81,11 @@ BOOL WINAPI WaitForDebugEvent(
                 event->u.Exception.ExceptionRecord.ExceptionRecord  = wine_server_get_ptr( data.exception.record );
                 event->u.Exception.ExceptionRecord.ExceptionAddress = wine_server_get_ptr( data.exception.address );
                 event->u.Exception.ExceptionRecord.NumberParameters = data.exception.nb_params;
-                for (i = 0; i < data.exception.nb_params; i++)
-                    event->u.Exception.ExceptionRecord.ExceptionInformation[i] = data.exception.params[i];
+                {
+                    int i;
+                    for (i = 0; i < data.exception.nb_params; i++)
+                        event->u.Exception.ExceptionRecord.ExceptionInformation[i] = data.exception.params[i];
+                }
                 break;
             case CREATE_THREAD_DEBUG_EVENT:
                 event->u.CreateThread.hThread           = wine_server_ptr_handle( data.create_thread.handle );
diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c
index 8ca4555..2e0cc8a 100644
--- a/dlls/kernel32/volume.c
+++ b/dlls/kernel32/volume.c
@@ -445,7 +445,7 @@ static enum fs_type VOLUME_ReadCDSuperblock( HANDLE handle, BYTE *buff )
  */
 static BOOL UDF_Find_PVD( HANDLE handle, BYTE pvd[] )
 {
-    int i;
+    unsigned int i;
     DWORD offset;
     INT locations[] = { 256, -1, -257, 512 };
 
@@ -548,7 +548,7 @@ static void VOLUME_GetSuperblockLabel( const UNICODE_STRING *device, HANDLE hand
             }
             else
             {
-                int i;
+                unsigned int i;
 
                 label_len = 1 + pvd[24+32-1];
                 for(i=0; i<label_len && i<len; i+=2)




More information about the wine-patches mailing list