changeset 2864:95bac7109ff0 libavcodec

Kill some compiler warnings. Compiled code verified identical after changes.
author mru
date Tue, 06 Sep 2005 21:25:35 +0000
parents 521756176cbb
children 3b999ce45b37
files i386/dsputil_mmx.c i386/dsputil_mmx_rnd.h parser.c pnm.c rangecoder.c vp3dsp.c
diffstat 6 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/i386/dsputil_mmx.c	Tue Sep 06 15:02:43 2005 +0000
+++ b/i386/dsputil_mmx.c	Tue Sep 06 21:25:35 2005 +0000
@@ -1080,7 +1080,8 @@
       return tmp + hf_noise8_mmx(pix+8, line_size, h);
 }
 
-static int nsse16_mmx(MpegEncContext *c, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
+static int nsse16_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
+    MpegEncContext *c = p;
     int score1= sse16_mmx(c, pix1, pix2, line_size, h);
     int score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2, line_size, h);
 
@@ -1088,7 +1089,8 @@
     else  return score1 + ABS(score2)*8;
 }
 
-static int nsse8_mmx(MpegEncContext *c, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
+static int nsse8_mmx(void *p, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
+    MpegEncContext *c = p;
     int score1= sse8_mmx(c, pix1, pix2, line_size, h);
     int score2= hf_noise8_mmx(pix1, line_size, h) - hf_noise8_mmx(pix2, line_size, h);
 
--- a/i386/dsputil_mmx_rnd.h	Tue Sep 06 15:02:43 2005 +0000
+++ b/i386/dsputil_mmx_rnd.h	Tue Sep 06 21:25:35 2005 +0000
@@ -55,7 +55,7 @@
 	:REG_a, "memory");
 }
 
-static void DEF(put, pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
+static void attribute_unused DEF(put, pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
 {
     MOVQ_BFE(mm6);
     __asm __volatile(
@@ -151,7 +151,7 @@
 	:REG_a, "memory");
 }
 
-static void DEF(put, pixels16_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
+static void attribute_unused DEF(put, pixels16_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
 {
     MOVQ_BFE(mm6);
     __asm __volatile(
@@ -296,7 +296,7 @@
 }
 
 // avg_pixels
-static void DEF(avg, pixels4)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+static void attribute_unused DEF(avg, pixels4)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 {
     MOVQ_BFE(mm6);
     JUMPALIGN();
--- a/parser.c	Tue Sep 06 15:02:43 2005 +0000
+++ b/parser.c	Tue Sep 06 21:25:35 2005 +0000
@@ -159,7 +159,8 @@
         }
     }
 
-    *poutbuf= buf;
+    /* cast to avoid warning about discarding qualifiers */
+    *poutbuf= (uint8_t *) buf;
     *poutbuf_size= buf_size;
     if(avctx->extradata){
         if(  (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
--- a/pnm.c	Tue Sep 06 15:02:43 2005 +0000
+++ b/pnm.c	Tue Sep 06 21:25:35 2005 +0000
@@ -473,8 +473,8 @@
         pnmctx.bytestream_end= pc->buffer + pc->index;
     }else{
         pnmctx.bytestream_start=
-        pnmctx.bytestream= buf;
-        pnmctx.bytestream_end= buf + buf_size;
+        pnmctx.bytestream= (uint8_t *) buf; /* casts avoid warnings */
+        pnmctx.bytestream_end= (uint8_t *) buf + buf_size;
     }
     if(pnm_decode_header(avctx, &pnmctx) < 0){
         if(pnmctx.bytestream < pnmctx.bytestream_end){
--- a/rangecoder.c	Tue Sep 06 15:02:43 2005 +0000
+++ b/rangecoder.c	Tue Sep 06 21:25:35 2005 +0000
@@ -49,7 +49,8 @@
 }
 
 void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size){
-    ff_init_range_encoder(c, buf, buf_size);
+    /* cast to avoid compiler warning */
+    ff_init_range_encoder(c, (uint8_t *) buf, buf_size);
 
     c->low =(*c->bytestream++)<<8;
     c->low+= *c->bytestream++;
--- a/vp3dsp.c	Tue Sep 06 15:02:43 2005 +0000
+++ b/vp3dsp.c	Tue Sep 06 21:25:35 2005 +0000
@@ -25,7 +25,6 @@
 #include "common.h"
 #include "avcodec.h"
 #include "dsputil.h"
-#include "vp3data.h"
 
 #define IdctAdjustBeforeShift 8
 #define xC1S7 64277