]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
wma: Fix two gcc warnings on Slow Leopard:
authorAndre Noll <maan@systemlinux.org>
Mon, 21 Dec 2009 10:35:43 +0000 (11:35 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 21 Dec 2009 10:35:43 +0000 (11:35 +0100)
Fixes

wma_common.c: In function 'search_pattern':
wma_common.c:41: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'long int'
wma_common.c: In function 'find_audio_stream_info':
wma_common.c:59: warning: format '%0x' expects type 'unsigned int', but argument 4 has type 'long int'

The cast is neccessary because the type of a pointer difference is
implementation-defined...

wma_common.c

index 10633b5b7e46f5193782ecb5e13b1a57e2991459..9d3aaa6266089a029f38797c8d769f05108e48f9 100644 (file)
@@ -39,7 +39,7 @@ const char *search_pattern(const char *pattern, int pattern_len,
                if (memcmp(p, pattern, pattern_len))
                        continue;
                PARA_DEBUG_LOG("found %d byte pattern@%d\n",
-                       pattern_len, p - buf);
+                       pattern_len, (int)(p - buf));
                return p;
        }
        PARA_NOTICE_LOG("%d byte pattern not found\n", pattern_len);
@@ -56,7 +56,7 @@ static int find_audio_stream_info(const char *buf, int len)
 
        if (!p)
                return -E_WMA_NO_GUID;
-       PARA_DEBUG_LOG("found audio stream guid@%0x\n", p - buf);
+       PARA_DEBUG_LOG("found audio stream guid@%0x\n", (int)(p - buf));
        return p - buf + 16;
 }