changeset 2288:3d4a1f8e6a27 libavcodec

* fixing a few of gcc 'clean-code' warnings
author kabi
date Wed, 06 Oct 2004 08:50:46 +0000
parents 679642dc54cf
children 5443c3fc2448
files common.h indeo3.c ra144.c ra288.c
diffstat 4 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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"
--- 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);
--- 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;
 
--- 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;