History

kill a bunch of compiler warnings

Originally committed as revision 4522 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård committed 21 years ago

Commit bf4e3bd1 parent 72ce05315 files · +26 −31Browse files

Unified · Split

15 files
  1. libavcodec/dsputil.c +4 −2
  2. libavcodec/h264.c +10 −10
  3. libavcodec/i386/vp3dsp_sse2.c +0 −1
  4. libavcodec/indeo2.c +0 −1
  5. libavcodec/motion_est.c +1 −2
  6. libavcodec/mpeg12.c +0 −1
  7. libavcodec/mpegvideo.c +1 −1
  8. libavcodec/ulti.c +1 −1
  9. libavcodec/vp3.c +0 −1
  10. libavcodec/vp3dsp.c +1 −1
  11. libavformat/avidec.c +0 −2
  12. libavformat/nsvdec.c +5 −5
  13. libavformat/utils.c +1 −1
  14. libavformat/yuv4mpeg.c +1 −1
  15. libavutil/intfloat_readwrite.c +1 −1
libavcodec/dsputil.c+4−2
@@ -2988,7 +2988,8 @@ static int pix_abs8_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, · 2987 unmodified lines
29882988 return s;
29892989 }
29902990
2991−static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h){
2991+static int nsse16_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h){
2992+ MpegEncContext *c = v;
29922993 int score1=0;
29932994 int score2=0;
29942995 int x,y;
@@ -3013,7 +3014,8 @@ static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int · 18 unmodified lines
30133014 else return score1 + ABS(score2)*8;
30143015 }
30153016
3016−static int nsse8_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h){
3017+static int nsse8_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h){
3018+ MpegEncContext *c = v;
30173019 int score1=0;
30183020 int score2=0;
30193021 int x,y;
libavcodec/h264.c+10−10
@@ -1277,9 +1277,9 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ · 1276 unmodified lines
12771277 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref[0], 1);
12781278 fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, ref[1], 1);
12791279 if(!IS_INTRA(mb_type_col)
1280− && ( l1ref0[0] == 0 && ABS(l1mv0[0][0]) <= 1 && ABS(l1mv0[0][1]) <= 1
1281− || l1ref0[0] < 0 && l1ref1[0] == 0 && ABS(l1mv1[0][0]) <= 1 && ABS(l1mv1[0][1]) <= 1
1282− && (h->x264_build>33 || !h->x264_build))){
1280+ && ( (l1ref0[0] == 0 && ABS(l1mv0[0][0]) <= 1 && ABS(l1mv0[0][1]) <= 1)
1281+ || (l1ref0[0] < 0 && l1ref1[0] == 0 && ABS(l1mv1[0][0]) <= 1 && ABS(l1mv1[0][1]) <= 1
1282+ && (h->x264_build>33 || !h->x264_build)))){
12831283 if(ref[0] > 0)
12841284 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4);
12851285 else
@@ -1308,8 +1308,8 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ · 22 unmodified lines
13081308
13091309 /* col_zero_flag */
13101310 if(!IS_INTRA(mb_type_col) && ( l1ref0[x8 + y8*h->b8_stride] == 0
1311− || l1ref0[x8 + y8*h->b8_stride] < 0 && l1ref1[x8 + y8*h->b8_stride] == 0
1312− && (h->x264_build>33 || !h->x264_build))){
1311+ || (l1ref0[x8 + y8*h->b8_stride] < 0 && l1ref1[x8 + y8*h->b8_stride] == 0
1312+ && (h->x264_build>33 || !h->x264_build)))){
13131313 const int16_t (*l1mv)[2]= l1ref0[x8 + y8*h->b8_stride] == 0 ? l1mv0 : l1mv1;
13141314 for(i4=0; i4<4; i4++){
13151315 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*h->b_stride];
@@ -1347,7 +1347,7 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ · 31 unmodified lines
13471347 const int x8 = i8&1;
13481348 const int y8 = i8>>1;
13491349 int ref0, dist_scale_factor;
1350− int16_t (*l1mv)[2]= l1mv0;
1350+ const int16_t (*l1mv)[2]= l1mv0;
13511351
13521352 if(is_b8x8 && !IS_DIRECT(h->sub_mb_type[i8]))
13531353 continue;
@@ -2327,7 +2327,7 @@ static void pred8x8_plane_c(uint8_t *src, int stride){ · 973 unmodified lines
23272327 const int l0 = ((has_topleft ? SRC(-1,-1) : SRC(-1,0)) \
23282328 + 2*SRC(-1,0) + SRC(-1,1) + 2) >> 2; \
23292329 PL(1) PL(2) PL(3) PL(4) PL(5) PL(6) \
2330− const int l7 = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2
2330+ const int l7 attribute_unused = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2
23312331
23322332 #define PT(x) \
23332333 const int t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2;
@@ -2335,7 +2335,7 @@ static void pred8x8_plane_c(uint8_t *src, int stride){ · 1 unmodified line
23352335 const int t0 = ((has_topleft ? SRC(-1,-1) : SRC(0,-1)) \
23362336 + 2*SRC(0,-1) + SRC(1,-1) + 2) >> 2; \
23372337 PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) \
2338− const int t7 = ((has_topright ? SRC(8,-1) : SRC(7,-1)) \
2338+ const int t7 attribute_unused = ((has_topright ? SRC(8,-1) : SRC(7,-1)) \
23392339 + 2*SRC(7,-1) + SRC(6,-1) + 2) >> 2
23402340
23412341 #define PTR(x) \
@@ -6188,7 +6188,7 @@ static void filter_mb_edgev( H264Context *h, uint8_t *pix, int stride, int bS[4] · 3846 unmodified lines
61886188 }
61896189 }
61906190 static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
6191− int i, d;
6191+ int i;
61926192 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
61936193 const int alpha = alpha_table[index_a];
61946194 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
@@ -6418,7 +6418,7 @@ static void filter_mb_edgeh( H264Context *h, uint8_t *pix, int stride, int bS[4] · 223 unmodified lines
64186418 }
64196419
64206420 static void filter_mb_edgech( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) {
6421− int i, d;
6421+ int i;
64226422 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 );
64236423 const int alpha = alpha_table[index_a];
64246424 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )];
libavcodec/i386/vp3dsp_sse2.c+0−1
@@ -799,7 +799,6 @@ static const unsigned short __align16 SSE2_idct_data[7 * 8] = · 798 unmodified lines
799799 void ff_vp3_idct_sse2(int16_t *input_data)
800800 {
801801 unsigned char *input_bytes = (unsigned char *)input_data;
802− unsigned char *dequant_const_bytes = (unsigned char *)SSE2_dequant_const;
803802 unsigned char *output_data_bytes = (unsigned char *)input_data;
804803 unsigned char *idct_data_bytes = (unsigned char *)SSE2_idct_data;
805804 unsigned char *Eight = (unsigned char *)eight_data;
libavcodec/indeo2.c+0−1
@@ -141,7 +141,6 @@ static int ir2_decode_frame(AVCodecContext *avctx, · 140 unmodified lines
141141 AVFrame *picture = data;
142142 AVFrame * const p= (AVFrame*)&s->picture;
143143 int start;
144− int i;
145144
146145 if(p->data[0])
147146 avctx->release_buffer(avctx, p);
libavcodec/motion_est.c+1−2
@@ -175,7 +175,7 @@ static always_inline int cmp(MpegEncContext *s, const int x, const int y, const · 174 unmodified lines
175175 }else
176176 d= 256*256*256*32;
177177 }else{
178− int uvdxy;
178+ int uvdxy; /* no, it might not be used uninitialized */
179179 if(dxy){
180180 if(qpel){
181181 c->qpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride); //FIXME prototype (add h)
@@ -1563,7 +1563,6 @@ static inline int check_bidir_mv(MpegEncContext * s, · 1381 unmodified lines
15631563 MotionEstContext * const c= &s->me;
15641564 uint8_t * const mv_penalty= c->mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame
15651565 int stride= c->stride;
1566− int uvstride= c->uvstride;
15671566 uint8_t *dest_y = c->scratchpad;
15681567 uint8_t *ptr;
15691568 int dxy;
libavcodec/mpeg12.c+0−1
@@ -1810,7 +1810,6 @@ static inline int mpeg2_fast_decode_block_non_intra(MpegEncContext *s, · 1809 unmodified lines
18101810 RLTable *rl = &rl_mpeg1;
18111811 uint8_t * const scantable= s->intra_scantable.permutated;
18121812 const int qscale= s->qscale;
1813− int v;
18141813 OPEN_READER(re, &s->gb);
18151814 i = -1;
18161815
libavcodec/mpegvideo.c+1−1
@@ -887,7 +887,7 @@ void MPV_common_end(MpegEncContext *s) · 886 unmodified lines
887887 int MPV_encode_init(AVCodecContext *avctx)
888888 {
889889 MpegEncContext *s = avctx->priv_data;
890− int i, dummy;
890+ int i;
891891 int chroma_h_shift, chroma_v_shift;
892892
893893 MPV_encode_defaults(s);
libavcodec/ulti.c+1−1
@@ -37,7 +37,7 @@ typedef struct UltimotionDecodeContext { · 36 unmodified lines
3737 AVCodecContext *avctx;
3838 int width, height, blocks;
3939 AVFrame frame;
40− uint8_t *ulti_codebook;
40+ const uint8_t *ulti_codebook;
4141 } UltimotionDecodeContext;
4242
4343 static int ulti_decode_init(AVCodecContext *avctx)
libavcodec/vp3.c+0−1
@@ -1725,7 +1725,6 @@ static void render_slice(Vp3DecodeContext *s, int slice) · 1724 unmodified lines
17251725 int plane_height;
17261726 int slice_height;
17271727 int current_macroblock_entry = slice * s->macroblock_width * 6;
1728− int *bounding_values= s->bounding_values_array+127;
17291728 int fragment_width;
17301729
17311730 if (slice >= s->macroblock_height)
libavcodec/vp3dsp.c+1−1
@@ -45,7 +45,7 @@ static always_inline void idct(uint8_t *dst, int stride, int16_t *input, int typ · 44 unmodified lines
4545 int _Ed, _Gd, _Add, _Bdd, _Fd, _Hd;
4646 int t1, t2;
4747
48− int i, j;
48+ int i;
4949
5050 /* Inverse DCT on the rows now */
5151 for (i = 0; i < 8; i++) {
libavformat/avidec.c+0−2
@@ -644,14 +644,12 @@ static int avi_read_idx1(AVFormatContext *s, int size) · 643 unmodified lines
644644 }
645645
646646 static int guess_ni_flag(AVFormatContext *s){
647− AVIContext *avi = s->priv_data;
648647 int i;
649648 int64_t last_start=0;
650649 int64_t first_end= INT64_MAX;
651650
652651 for(i=0; i<s->nb_streams; i++){
653652 AVStream *st = s->streams[i];
654− AVIStream *ast = st->priv_data;
655653 int n= st->nb_index_entries;
656654
657655 if(n <= 0)
libavformat/nsvdec.c+5−5
@@ -297,8 +297,8 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap) · 296 unmodified lines
297297
298298 //s->file_size = (uint32_t)get_le32(pb);
299299 file_size = (uint32_t)get_le32(pb);
300− PRINT(("NSV NSVf chunk_size %ld\n", size));
301− PRINT(("NSV NSVf file_size %Ld\n", file_size));
300+ PRINT(("NSV NSVf chunk_size %u\n", size));
301+ PRINT(("NSV NSVf file_size %u\n", file_size));
302302
303303 nsv->duration = duration = get_le32(pb); /* in ms */
304304 PRINT(("NSV NSVf duration %Ld ms\n", duration));
@@ -561,7 +561,7 @@ null_chunk_retry: · 256 unmodified lines
561561 asize = get_le16(pb);
562562 vsize = (vsize << 4) | (auxcount >> 4);
563563 auxcount &= 0x0f;
564− PRINT(("NSV CHUNK %d aux, %ld bytes video, %d bytes audio\n", auxcount, vsize, asize));
564+ PRINT(("NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize));
565565 /* skip aux stuff */
566566 for (i = 0; i < auxcount; i++) {
567567 auxsize = get_le16(pb);
@@ -614,7 +614,7 @@ null_chunk_retry: · 46 unmodified lines
614614 channels = get_byte(pb);
615615 samplerate = get_le16(pb);
616616 asize-=4;
617− PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %ld\n", bps, channels, samplerate));
617+ PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate));
618618 if (fill_header) {
619619 st[NSV_ST_AUDIO]->need_parsing = 0; /* we know everything */
620620 if (bps != 16) {
@@ -629,7 +629,7 @@ null_chunk_retry: · 8 unmodified lines
629629 st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;
630630 av_set_pts_info(st[NSV_ST_AUDIO], 64, 1,
631631 st[NSV_ST_AUDIO]->codec->sample_rate);
632− PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %ld\n", bps, channels, samplerate));
632+ PRINT(("NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate));
633633 }
634634 }
635635 av_get_packet(pb, pkt, asize);
libavformat/utils.c+1−1
@@ -1569,7 +1569,7 @@ static void av_estimate_timings_from_pts(AVFormatContext *ic) · 1568 unmodified lines
15691569 AVPacket pkt1, *pkt = &pkt1;
15701570 AVStream *st;
15711571 int read_size, i, ret;
1572− int64_t start_time, end_time, end_time1;
1572+ int64_t end_time;
15731573 int64_t filesize, offset, duration;
15741574
15751575 /* free previous packet */
libavformat/yuv4mpeg.c+1−1
@@ -336,7 +336,7 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt) · 335 unmodified lines
336336 {
337337 int i;
338338 char header[MAX_FRAME_HEADER+1];
339− int packet_size, ret, width, height;
339+ int packet_size, width, height;
340340 AVStream *st = s->streams[0];
341341
342342 for (i=0; i<MAX_FRAME_HEADER; i++) {
libavutil/intfloat_readwrite.c+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
2828 double av_int2dbl(int64_t v){
2929 if(v+v > 0xFFELLU<<52)
3030 return 0.0/0.0;
31− return ldexp(((v&(1LL<<52)-1) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);
31+ return ldexp(((v&((1LL<<52)-1)) + (1LL<<52)) * (v>>63|1), (v>>52&0x7FF)-1075);
3232 }
3333
3434 float av_int2flt(int32_t v){

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t