avifil32: Removed sign comparison warning (sizeof expresions)

Marko Nikolic grkoma at gmail.com
Sun Aug 22 14:15:48 CDT 2010


sizeof expresion always return unsigned type, so it is casted
when comparing with signed values.
---
 dlls/avifil32/wavfile.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c
index fd6d9ec..3fc934c 100644
--- a/dlls/avifil32/wavfile.c
+++ b/dlls/avifil32/wavfile.c
@@ -803,7 +803,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
   TRACE("(%p,%d,%p,%d)\n", iface, pos, format, formatsize);
 
   /* check parameters */
-  if (format == NULL || formatsize <= sizeof(PCMWAVEFORMAT))
+  if (format == NULL || formatsize <= (LONG)sizeof(PCMWAVEFORMAT))
     return AVIERR_BADPARAM;
 
   /* We can only do this to an empty wave file, but ignore call
@@ -1277,7 +1277,7 @@ static HRESULT AVIFILE_SaveFile(const IAVIFileImpl *This)
     return AVIERR_FILEWRITE;
 
   /* fact chunk is needed for non-pcm waveforms */
-  if (This->lpFormat != NULL && This->cbFormat > sizeof(PCMWAVEFORMAT) &&
+  if (This->lpFormat != NULL && This->cbFormat > (LONG)sizeof(PCMWAVEFORMAT) &&
       This->lpFormat->wFormatTag != WAVE_FORMAT_PCM) {
     WAVEFORMATEX wfx;
     DWORD        dwFactLength;
-- 
1.7.0.4




More information about the wine-patches mailing list