Andrew Talbot : ntdll: Avoid signed-unsigned integer comparisons.

Alexandre Julliard julliard at winehq.org
Thu Feb 21 14:29:36 CST 2013


Module: wine
Branch: master
Commit: d0d28b96a4ee1c370ee48f12328e91883c77afac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d0d28b96a4ee1c370ee48f12328e91883c77afac

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Wed Feb 20 21:25:56 2013 +0000

ntdll: Avoid signed-unsigned integer comparisons.

---

 dlls/ntdll/directory.c |    2 +-
 dlls/ntdll/nt.c        |    6 +++---
 dlls/ntdll/sync.c      |    3 ++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 863a320..c552a8b 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -145,7 +145,7 @@ struct file_identity
 };
 
 static struct file_identity ignored_files[MAX_IGNORED_FILES];
-static int ignored_files_count;
+static unsigned int ignored_files_count;
 
 union file_directory_info
 {
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index a2e0716..ee89bb7 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1166,7 +1166,7 @@ void fill_cpu_info(void)
 static inline BOOL logical_proc_info_add_by_id(SYSTEM_LOGICAL_PROCESSOR_INFORMATION *data,
         DWORD *len, DWORD max_len, LOGICAL_PROCESSOR_RELATIONSHIP rel, DWORD id, DWORD proc)
 {
-    int i;
+    DWORD i;
 
     for(i=0; i<*len; i++)
     {
@@ -1192,7 +1192,7 @@ static inline BOOL logical_proc_info_add_by_id(SYSTEM_LOGICAL_PROCESSOR_INFORMAT
 static inline BOOL logical_proc_info_add_cache(SYSTEM_LOGICAL_PROCESSOR_INFORMATION *data,
         DWORD *len, DWORD max_len, ULONG_PTR mask, CACHE_DESCRIPTOR *cache)
 {
-    int i;
+    DWORD i;
 
     for(i=0; i<*len; i++)
     {
@@ -1891,7 +1891,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
             if (cpus == 0)
             {
                 static int i = 1;
-                int n;
+                unsigned int n;
                 cpus = min(NtCurrentTeb()->Peb->NumberOfProcessors, out_cpus);
                 len = sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * cpus;
                 sppi = RtlAllocateHeap(GetProcessHeap(), 0, len);
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index 09151a9..58dde65 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -1091,7 +1091,8 @@ NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handles, UIN
                                           const LARGE_INTEGER *timeout, HANDLE signal_object )
 {
     NTSTATUS ret;
-    int i, cookie;
+    UINT i;
+    int cookie;
     BOOL user_apc = FALSE;
     obj_handle_t obj_handles[MAXIMUM_WAIT_OBJECTS];
     obj_handle_t apc_handle = 0;




More information about the wine-cvs mailing list