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

Alexandre Julliard julliard at winehq.org
Thu Feb 14 15:01:31 CST 2013


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Wed Feb 13 21:06:41 2013 +0000

msctf: Avoid signed-unsigned integer comparisons.

---

 dlls/msctf/categorymgr.c |    2 +-
 dlls/msctf/context.c     |    2 +-
 dlls/msctf/msctf.c       |   10 +++++-----
 dlls/msctf/threadmgr.c   |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/msctf/categorymgr.c b/dlls/msctf/categorymgr.c
index 167e059..c1596c2 100644
--- a/dlls/msctf/categorymgr.c
+++ b/dlls/msctf/categorymgr.c
@@ -241,7 +241,7 @@ static HRESULT WINAPI CategoryMgr_FindClosestCategory ( ITfCategoryMgr *iface,
 
         if (ulCount)
         {
-            int j;
+            ULONG j;
             BOOL found = FALSE;
             for (j = 0; j < ulCount; j++)
                 if (IsEqualGUID(&guid, ppcatidList[j]))
diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c
index c8d3ac4..147805c 100644
--- a/dlls/msctf/context.c
+++ b/dlls/msctf/context.c
@@ -369,7 +369,7 @@ static HRESULT WINAPI Context_SetSelection (ITfContext *iface,
 {
     TS_SELECTION_ACP *acp;
     Context *This = (Context *)iface;
-    INT i;
+    ULONG i;
     HRESULT hr;
 
     TRACE("(%p) %i %i %p\n",This,ec,ulCount,pSelection);
diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c
index bc12a29..109c3ab 100644
--- a/dlls/msctf/msctf.c
+++ b/dlls/msctf/msctf.c
@@ -198,7 +198,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
  */
 DWORD generate_Cookie(DWORD magic, LPVOID data)
 {
-    int i;
+    UINT i;
 
     /* try to reuse IDs if possible */
     for (i = 0; i < id_last; i++)
@@ -282,7 +282,7 @@ LPVOID remove_Cookie(DWORD id)
 
 DWORD enumerate_Cookie(DWORD magic, DWORD *index)
 {
-    int i;
+    unsigned int i;
     for (i = *index; i < id_last; i++)
         if (cookies[i].id != 0 && cookies[i].magic == magic)
         {
@@ -614,12 +614,12 @@ HRESULT WINAPI SetInputScopes(HWND hwnd, const INT *pInputScopes,
                               UINT cInputScopes, WCHAR **ppszPhraseList,
                               UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS)
 {
-    int i;
+    UINT i;
     FIXME("STUB: %p ... %s %s\n",hwnd, debugstr_w(pszRegExp), debugstr_w(pszSRGS));
     for (i = 0; i < cInputScopes; i++)
-        TRACE("\tScope[%i] = %i\n",i,pInputScopes[i]);
+        TRACE("\tScope[%u] = %i\n",i,pInputScopes[i]);
     for (i = 0; i < cPhrases; i++)
-        TRACE("\tPhrase[%i] = %s\n",i,debugstr_w(ppszPhraseList[i]));
+        TRACE("\tPhrase[%u] = %s\n",i,debugstr_w(ppszPhraseList[i]));
 
     return S_OK;
 }
diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c
index 5a18b39..63c7ba0 100644
--- a/dlls/msctf/threadmgr.c
+++ b/dlls/msctf/threadmgr.c
@@ -1392,7 +1392,7 @@ static HRESULT WINAPI EnumTfDocumentMgr_Next(IEnumTfDocumentMgrs *iface,
 
 static HRESULT WINAPI EnumTfDocumentMgr_Skip( IEnumTfDocumentMgrs* iface, ULONG celt)
 {
-    INT i;
+    ULONG i;
     EnumTfDocumentMgr *This = (EnumTfDocumentMgr *)iface;
     TRACE("(%p)\n",This);
     for(i = 0; i < celt && This->index != NULL; i++)




More information about the wine-cvs mailing list