Andrew Talbot : quartz: Sign-compare warnings fix.

Alexandre Julliard julliard at winehq.org
Wed Nov 5 09:38:04 CST 2008


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Tue Nov  4 22:22:53 2008 +0000

quartz: Sign-compare warnings fix.

---

 dlls/quartz/enummedia.c   |    2 +-
 dlls/quartz/filtergraph.c |    4 ++--
 dlls/quartz/main.c        |    9 +++++----
 dlls/quartz/mpegsplit.c   |    4 ++--
 dlls/quartz/parser.c      |    4 ++--
 dlls/quartz/waveparser.c  |    4 ++--
 6 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/dlls/quartz/enummedia.c b/dlls/quartz/enummedia.c
index ed5edb3..f18cb90 100644
--- a/dlls/quartz/enummedia.c
+++ b/dlls/quartz/enummedia.c
@@ -168,7 +168,7 @@ static ULONG WINAPI IEnumMediaTypesImpl_Release(IEnumMediaTypes * iface)
 
     if (!refCount)
     {
-        int i;
+        ULONG i;
         for (i = 0; i < This->enumMediaDetails.cMediaTypes; i++)
             if (This->enumMediaDetails.pMediaTypes[i].pbFormat)
                 CoTaskMemFree(This->enumMediaDetails.pMediaTypes[i].pbFormat);
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 5837a47..eec0e44 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -1025,7 +1025,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
         hr = GetInternalConnections(pfilter, ppinfilter, &ppins, &nb);
 
         if (SUCCEEDED(hr)) {
-            int i;
+            unsigned int i;
             if (nb == 0) {
                 IPin_Disconnect(ppinfilter);
                 IPin_Disconnect(ppinOut);
@@ -1036,7 +1036,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
             {
                 LPWSTR pinname = NULL;
 
-                TRACE("Processing pin %d\n", i);
+                TRACE("Processing pin %u\n", i);
 
                 hr = IPin_QueryId(ppins[i], &pinname);
                 if (SUCCEEDED(hr))
diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c
index daefdc5..5eece59 100644
--- a/dlls/quartz/main.c
+++ b/dlls/quartz/main.c
@@ -24,6 +24,7 @@
 #include "wine/debug.h"
 
 #include "quartz_private.h"
+#include "wine/unicode.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
 
@@ -280,7 +281,7 @@ LONG WINAPI DBToAmpFactor(LONG db)
  */
 DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
 {
-    int len;
+    unsigned int len;
     static const char format[] = "Error: 0x%x";
     char error[MAX_ERROR_TEXT_LEN];
 
@@ -288,7 +289,7 @@ DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
 
     if (!buffer) return 0;
     wsprintfA(error, format, hr);
-    if ((len = lstrlenA(error)) >= maxlen) return 0; 
+    if ((len = strlen(error)) >= maxlen) return 0;
     lstrcpyA(buffer, error);
     return len;
 }
@@ -298,7 +299,7 @@ DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
  */
 DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
 {
-    int len;
+    unsigned int len;
     static const WCHAR format[] = {'E','r','r','o','r',':',' ','0','x','%','l','x',0};
     WCHAR error[MAX_ERROR_TEXT_LEN];
 
@@ -306,7 +307,7 @@ DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
 
     if (!buffer) return 0;
     wsprintfW(error, format, hr);
-    if ((len = lstrlenW(error)) >= maxlen) return 0; 
+    if ((len = strlenW(error)) >= maxlen) return 0;
     lstrcpyW(buffer, error);
     return len;
 }
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c
index 8625277..b5b01ff 100644
--- a/dlls/quartz/mpegsplit.c
+++ b/dlls/quartz/mpegsplit.c
@@ -286,7 +286,7 @@ static HRESULT MPEGSplitter_process_sample(LPVOID iface, IMediaSample * pSample,
 
     if (BYTES_FROM_MEDIATIME(tStop) >= This->EndOfFile || This->position >= This->Parser.mediaSeeking.llStop)
     {
-        int i;
+        unsigned int i;
 
         TRACE("End of file reached\n");
 
@@ -301,7 +301,7 @@ static HRESULT MPEGSplitter_process_sample(LPVOID iface, IMediaSample * pSample,
                 IPin_Release(ppin);
             }
             if (FAILED(hr))
-                WARN("Error sending EndOfStream to pin %d (%x)\n", i, hr);
+                WARN("Error sending EndOfStream to pin %u (%x)\n", i, hr);
         }
 
         /* Force the pullpin thread to stop */
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c
index 628eab6..59ff427 100644
--- a/dlls/quartz/parser.c
+++ b/dlls/quartz/parser.c
@@ -219,7 +219,7 @@ HRESULT WINAPI Parser_Stop(IBaseFilter * iface)
 {
     ParserImpl *This = (ParserImpl *)iface;
     PullPin *pin = (PullPin *)This->ppPins[0];
-    int i;
+    ULONG i;
 
     TRACE("()\n");
 
@@ -293,7 +293,7 @@ HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
     ParserImpl *This = (ParserImpl *)iface;
     PullPin *pin = (PullPin *)This->ppPins[0];
 
-    int i;
+    ULONG i;
 
     TRACE("(%s)\n", wine_dbgstr_longlong(tStart));
 
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c
index dbc096c..774db98 100644
--- a/dlls/quartz/waveparser.c
+++ b/dlls/quartz/waveparser.c
@@ -142,7 +142,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR
 
     if (tStop >= This->EndOfFile || (bytepos_to_duration(This, tStop) >= This->Parser.mediaSeeking.llStop) || hr == VFW_E_NOT_CONNECTED)
     {
-        int i;
+        unsigned int i;
 
         TRACE("End of file reached\n");
 
@@ -151,7 +151,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample, DWORD_PTR
             IPin* ppin;
             HRESULT hr;
 
-            TRACE("Send End Of Stream to output pin %d\n", i);
+            TRACE("Send End Of Stream to output pin %u\n", i);
 
             hr = IPin_ConnectedTo(This->Parser.ppPins[i+1], &ppin);
             if (SUCCEEDED(hr))




More information about the wine-cvs mailing list