# HG changeset patch # User kabi # Date 1097052646 0 # Node ID 3d4a1f8e6a27cd3442012c8c98a2add0b8530c33 # Parent 679642dc54cf85340f8b375cff5f2534aa3c60f2 * fixing a few of gcc 'clean-code' warnings diff -r 679642dc54cf -r 3d4a1f8e6a27 common.h --- a/common.h Tue Oct 05 19:44:26 2004 +0000 +++ b/common.h Wed Oct 06 08:50:46 2004 +0000 @@ -391,7 +391,7 @@ /* used to avoid missaligned exceptions on some archs (alpha, ...) */ #ifdef ARCH_X86 -# define unaligned32(a) (*(uint32_t*)(a)) +# define unaligned32(a) (*(const uint32_t*)(a)) #else # ifdef __GNUC__ static inline uint32_t unaligned32(const void *v) { @@ -620,7 +620,7 @@ (gb)->index= name##_index;\ # define UPDATE_CACHE(name, gb)\ - name##_cache= unaligned32_be( ((uint8_t *)(gb)->buffer)+(name##_index>>3) ) << (name##_index&0x07);\ + name##_cache= unaligned32_be( ((const uint8_t *)(gb)->buffer)+(name##_index>>3) ) << (name##_index&0x07);\ # define SKIP_CACHE(name, gb, num)\ name##_cache <<= (num);\ @@ -1253,7 +1253,7 @@ #endif #ifdef ARCH_X86 -static inline long long rdtsc() +static inline long long rdtsc(void) { long long l; asm volatile( "rdtsc\n\t" diff -r 679642dc54cf -r 3d4a1f8e6a27 indeo3.c --- a/indeo3.c Tue Oct 05 19:44:26 2004 +0000 +++ b/indeo3.c Wed Oct 06 08:50:46 2004 +0000 @@ -101,7 +101,8 @@ static void iv_alloc_frames(Indeo3DecodeContext *s) { int luma_width, luma_height, luma_pixels, chroma_width, chroma_height, - chroma_pixels, bufsize, i; + chroma_pixels, i; + unsigned int bufsize; luma_width = (s->width + 3) & (~3); luma_height = (s->height + 3) & (~3); diff -r 679642dc54cf -r 3d4a1f8e6a27 ra144.c --- a/ra144.c Tue Oct 05 19:44:26 2004 +0000 +++ b/ra144.c Wed Oct 06 08:50:46 2004 +0000 @@ -130,7 +130,7 @@ /* do quarter-block output */ -static void do_output_subblock(Real144_internal *glob, int x) +static void do_output_subblock(Real144_internal *glob, unsigned int x) { int a,b,c,d,e,f,g; diff -r 679642dc54cf -r 3d4a1f8e6a27 ra288.c --- a/ra288.c Tue Oct 05 19:44:26 2004 +0000 +++ b/ra288.c Wed Oct 06 08:50:46 2004 +0000 @@ -47,7 +47,7 @@ /* initial decode */ -static void unpack(unsigned short *tgt, unsigned char *src, int len) +static void unpack(unsigned short *tgt, unsigned char *src, unsigned int len) { int x,y,z; int n,temp;