Commit aad01dbe authored by mru's avatar mru

Kill some compiler warnings. Compiled code verified identical after changes.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4567 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0fc47ab2
...@@ -1080,7 +1080,8 @@ static int hf_noise16_mmx(uint8_t * pix1, int line_size, int h) { ...@@ -1080,7 +1080,8 @@ static int hf_noise16_mmx(uint8_t * pix1, int line_size, int h) {
return tmp + hf_noise8_mmx(pix+8, line_size, h); 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 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); int score2= hf_noise16_mmx(pix1, line_size, h) - hf_noise16_mmx(pix2, line_size, h);
...@@ -1088,7 +1089,8 @@ static int nsse16_mmx(MpegEncContext *c, uint8_t * pix1, uint8_t * pix2, int lin ...@@ -1088,7 +1089,8 @@ static int nsse16_mmx(MpegEncContext *c, uint8_t * pix1, uint8_t * pix2, int lin
else return score1 + ABS(score2)*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 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); int score2= hf_noise8_mmx(pix1, line_size, h) - hf_noise8_mmx(pix2, line_size, h);
......
...@@ -55,7 +55,7 @@ static void DEF(put, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line ...@@ -55,7 +55,7 @@ static void DEF(put, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line
:REG_a, "memory"); :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); MOVQ_BFE(mm6);
__asm __volatile( __asm __volatile(
...@@ -151,7 +151,7 @@ static void DEF(put, pixels16_x2)(uint8_t *block, const uint8_t *pixels, int lin ...@@ -151,7 +151,7 @@ static void DEF(put, pixels16_x2)(uint8_t *block, const uint8_t *pixels, int lin
:REG_a, "memory"); :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); MOVQ_BFE(mm6);
__asm __volatile( __asm __volatile(
...@@ -296,7 +296,7 @@ static void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int lin ...@@ -296,7 +296,7 @@ static void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int lin
} }
// avg_pixels // 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); MOVQ_BFE(mm6);
JUMPALIGN(); JUMPALIGN();
......
...@@ -159,7 +159,8 @@ int av_parser_change(AVCodecParserContext *s, ...@@ -159,7 +159,8 @@ int av_parser_change(AVCodecParserContext *s,
} }
} }
*poutbuf= buf; /* cast to avoid warning about discarding qualifiers */
*poutbuf= (uint8_t *) buf;
*poutbuf_size= buf_size; *poutbuf_size= buf_size;
if(avctx->extradata){ if(avctx->extradata){
if( (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER)) if( (keyframe && (avctx->flags2 & CODEC_FLAG2_LOCAL_HEADER))
......
...@@ -473,8 +473,8 @@ retry: ...@@ -473,8 +473,8 @@ retry:
pnmctx.bytestream_end= pc->buffer + pc->index; pnmctx.bytestream_end= pc->buffer + pc->index;
}else{ }else{
pnmctx.bytestream_start= pnmctx.bytestream_start=
pnmctx.bytestream= buf; pnmctx.bytestream= (uint8_t *) buf; /* casts avoid warnings */
pnmctx.bytestream_end= buf + buf_size; pnmctx.bytestream_end= (uint8_t *) buf + buf_size;
} }
if(pnm_decode_header(avctx, &pnmctx) < 0){ if(pnm_decode_header(avctx, &pnmctx) < 0){
if(pnmctx.bytestream < pnmctx.bytestream_end){ if(pnmctx.bytestream < pnmctx.bytestream_end){
......
...@@ -49,7 +49,8 @@ void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size){ ...@@ -49,7 +49,8 @@ void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size){
} }
void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size){ 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++)<<8;
c->low+= *c->bytestream++; c->low+= *c->bytestream++;
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "common.h" #include "common.h"
#include "avcodec.h" #include "avcodec.h"
#include "dsputil.h" #include "dsputil.h"
#include "vp3data.h"
#define IdctAdjustBeforeShift 8 #define IdctAdjustBeforeShift 8
#define xC1S7 64277 #define xC1S7 64277
......
...@@ -366,7 +366,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -366,7 +366,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
} }
if(avi->non_interleaved){ if(avi->non_interleaved){
int best_stream_index; int best_stream_index = 0;
AVStream *best_st= NULL; AVStream *best_st= NULL;
AVIStream *best_ast; AVIStream *best_ast;
int64_t best_ts= INT64_MAX; int64_t best_ts= INT64_MAX;
......
...@@ -432,13 +432,13 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack* track) // Basic ...@@ -432,13 +432,13 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack* track) // Basic
if (track->enc->codec_id == CODEC_ID_AAC) if (track->enc->codec_id == CODEC_ID_AAC)
{ {
track->vosLen = 2; track->vosLen = 2;
track->vosData = PSPAACData; track->vosData = (uint8_t *) PSPAACData;
} }
if (track->enc->codec_id == CODEC_ID_MPEG4) if (track->enc->codec_id == CODEC_ID_MPEG4)
{ {
track->vosLen = 28; track->vosLen = 28;
track->vosData = PSPMP4Data; track->vosData = (uint8_t *) PSPMP4Data;
} }
} }
......
...@@ -376,7 +376,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len) ...@@ -376,7 +376,7 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
const uint8_t *p, *p_end, *desc_list_end, *desc_end; const uint8_t *p, *p_end, *desc_list_end, *desc_end;
int program_info_length, pcr_pid, pid, stream_type; int program_info_length, pcr_pid, pid, stream_type;
int desc_list_len, desc_len, desc_tag; int desc_list_len, desc_len, desc_tag;
int comp_page, anc_page; int comp_page = 0, anc_page = 0; /* initialize to kill warnings */
char language[4]; char language[4];
#ifdef DEBUG_SI #ifdef DEBUG_SI
......
...@@ -981,7 +981,6 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt) ...@@ -981,7 +981,6 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
pktl = s->packet_buffer; pktl = s->packet_buffer;
if (pktl) { if (pktl) {
AVPacket *next_pkt= &pktl->pkt; AVPacket *next_pkt= &pktl->pkt;
AVStream *st= s->streams[ next_pkt->stream_index ];
if(genpts && next_pkt->dts != AV_NOPTS_VALUE){ if(genpts && next_pkt->dts != AV_NOPTS_VALUE){
while(pktl && next_pkt->pts == AV_NOPTS_VALUE){ while(pktl && next_pkt->pts == AV_NOPTS_VALUE){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment