From: Andre Noll Date: Mon, 21 Dec 2009 10:35:43 +0000 (+0100) Subject: wma: Fix two gcc warnings on Slow Leopard: X-Git-Tag: v0.4.1~6 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=eef8eae979b6acfe23eea809f4519510c7021015 wma: Fix two gcc warnings on Slow Leopard: 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... --- diff --git a/wma_common.c b/wma_common.c index 10633b5b..9d3aaa62 100644 --- a/wma_common.c +++ b/wma_common.c @@ -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; }