]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
warning patrol
authormellum <mellum@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 24 Mar 2004 23:32:48 +0000 (23:32 +0000)
committermellum <mellum@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 24 Mar 2004 23:32:48 +0000 (23:32 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2925 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

15 files changed:
configure
ffserver.c
libavcodec/4xm.c
libavcodec/avcodec.h
libavcodec/dv.c
libavcodec/flac.c
libavcodec/interplayvideo.c
libavcodec/motion_est.c
libavcodec/mpeg12.c
libavcodec/mpegvideo.c
libavformat/file.c
libavformat/framehook.h
libavformat/matroska.c
libavformat/movenc.c
libavformat/mpeg.c

index eb41868f51529b3785dea59b96504a69670debc3..700de7460d30b419106c46ce3eb5e9c8ef267294 100755 (executable)
--- a/configure
+++ b/configure
@@ -855,7 +855,7 @@ if test "$sdl" = "no" ; then
 fi
 
 if test "$debug" = "yes"; then
-       CFLAGS="$CFLAGS -g"
+       CFLAGS="-g $CFLAGS"
 fi
 
 if test "$optimize" = "small"; then
@@ -868,7 +868,7 @@ if test "$optimize" = "yes"; then
        CFLAGS="$CFLAGS -O5"
        LDFLAGS="$LDFLAGS -O5"
     else
-       CFLAGS="$CFLAGS -O3"
+       CFLAGS="-O3 $CFLAGS"
     fi
 fi
 
index 4fb1fdeebff2a5ead551177e8aa5ed5179864aec..20f2b2372461d8da1426a7f64490526527b2f174 100644 (file)
@@ -1468,7 +1468,7 @@ static int http_parse_request(HTTPContext *c)
                 if (eol) {
                     if (eol[-1] == '\r')
                         eol--;
-                    http_log("%.*s\n", eol - logline, logline);
+                    http_log("%.*s\n", (int) (eol - logline), logline);
                     c->suppress_log = 1;
                 }
             }
index 6544d88d0f86cd9fb1d8e2e2efa4e4c232da5d32..304453d6f1c97c0b7e43a36ab1c6347ea8c7dd77 100644 (file)
@@ -354,7 +354,7 @@ static int decode_p_frame(FourXContext *f, uint8_t *buf, int length){
     }
     
     if(bitstream_size != (get_bits_count(&f->gb)+31)/32*4)
-        av_log(f->avctx, AV_LOG_ERROR, " %d %d %d bytes left\n", 
+        av_log(f->avctx, AV_LOG_ERROR, " %d %zd %zd bytes left\n", 
             bitstream_size - (get_bits_count(&f->gb)+31)/32*4, 
             bytestream_size - (f->bytestream - (buf + 20 + bitstream_size + wordstream_size)),
             wordstream_size - (((uint8_t*)f->wordstream) - (buf + 20 + bitstream_size))
index 44a115858d3b79d48c4ffec43b8dfd4acfa711eb..62743b3ef6a22206741197d7a18fbbdfea23f260 100644 (file)
@@ -1895,6 +1895,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
 
 void avcodec_get_context_defaults(AVCodecContext *s);
 AVCodecContext *avcodec_alloc_context(void);
+void avcodec_get_frame_defaults(AVFrame *pic);
 AVFrame *avcodec_alloc_frame(void);
 
 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
index 6b7ca1d8d2ba576deac8a87af41f300b89e022a4..22d966dd8d310fb9a68ba4e90881234f212f2907 100644 (file)
@@ -113,7 +113,7 @@ static int dvvideo_init(AVCodecContext *avctx)
            return -ENOMEM;
        }
        for (i=0; i<12*27; i++)
-           (int)dv_anchor[i] = i;
+           dv_anchor[i] = (void*)(size_t)i;
        
         /* NOTE: as a trick, we use the fact the no codes are unused
            to accelerate the parsing of partial codes */
@@ -896,7 +896,7 @@ static inline void dv_encode_video_segment(DVVideoContext *s,
 static int dv_decode_mt(AVCodecContext *avctx, void* sl)
 {
     DVVideoContext *s = avctx->priv_data;
-    int slice = (int)sl;
+    int slice = (size_t)sl;
     dv_decode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80],
                            &s->sys->video_place[slice*5]);
     return 0;
@@ -905,7 +905,7 @@ static int dv_decode_mt(AVCodecContext *avctx, void* sl)
 static int dv_encode_mt(AVCodecContext *avctx, void* sl)
 {
     DVVideoContext *s = avctx->priv_data;
-    int slice = (int)sl;
+    int slice = (size_t)sl;
     dv_encode_video_segment(s, &s->buf[((slice/27)*6+(slice/3)+slice*5+7)*80],
                            &s->sys->video_place[slice*5]);
     return 0;
index 5f87cff9222f54558fa86773c21c0ea0bfb8e6c0..38e09363ab1c096e2eddde70cf29614431b42cec 100644 (file)
@@ -753,7 +753,6 @@ static int flac_decode_close(AVCodecContext *avctx)
 }
 
 static void flac_flush(AVCodecContext *avctx){
-    int i;
     FLACContext *s = avctx->priv_data;
 
     s->bitstream_size=
index 06816ba3e9e7e155b16558ec15a8f4bafa914b5d..48410f0364e4352051ea4021270a77599bd7e548 100644 (file)
@@ -846,7 +846,7 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
     }
     if ((s->stream_ptr != s->stream_end) &&
         (s->stream_ptr + 1 != s->stream_end)) {
-        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %d bytes left over\n",
+        av_log(s->avctx, AV_LOG_ERROR, " Interplay video: decode finished with %zd bytes left over\n",
             s->stream_end - s->stream_ptr);
     }
 }
index 5132487cf387e97eb93c8189a2c7dbb15a36baa3..f52f6e150d6128f7bce380fff8ca9cc2f3de0768 100644 (file)
@@ -774,10 +774,6 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
     int same=1;
     const int stride= s->linesize;
     const int uvstride= s->uvlinesize;
-    const int xmin= s->me.xmin;
-    const int ymin= s->me.ymin;
-    const int xmax= s->me.xmax;
-    const int ymax= s->me.ymax;
 
     for(block=0; block<4; block++){
         int mx4, my4;
index 4d2943a6cd37f7e472520376b64e5bb5d5a401d1..e4f5f26825194b827108bdbba592ac66f9d419c1 100644 (file)
@@ -242,7 +242,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
 {
         unsigned int vbv_buffer_size;
         unsigned int fps, v;
-        int n, i;
+        int i;
         uint64_t time_code;
         float best_aspect_error= 1E10;
         float aspect_ratio= av_q2d(s->avctx->sample_aspect_ratio);
@@ -954,7 +954,7 @@ static VLC mb_ptype_vlc;
 static VLC mb_btype_vlc;
 static VLC mb_pat_vlc;
 
-static void init_vlcs()
+static void init_vlcs(void)
 {
     static int done = 0;
 
@@ -2821,7 +2821,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
         input_size = buf_end - buf_ptr;
 
         if(avctx->debug & FF_DEBUG_STARTCODE){
-            av_log(avctx, AV_LOG_DEBUG, "%3X at %d left %d\n", start_code, buf_ptr-buf, input_size);
+            av_log(avctx, AV_LOG_DEBUG, "%3X at %zd left %d\n", start_code, buf_ptr-buf, input_size);
         }
 
                 /* prepare data for next start code */
index 28b20c319b8fea5a4044b91d56bb398e562b2bb9..a786f8ab7519dd829925f2358a44c28fe0eaff3e 100644 (file)
@@ -3382,7 +3382,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
     int dct_offset   = s->linesize*8; //default for progressive frames
     uint8_t *ptr_y, *ptr_cb, *ptr_cr;
     int wrap_y, wrap_c;
-    int emu=0;
     
     for(i=0; i<6; i++) skip_dct[i]=0;
     
@@ -4580,7 +4579,6 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src)
 
 static void encode_picture(MpegEncContext *s, int picture_number)
 {
-    int mb_x, mb_y;
     int i, j;
     int bits;
 
@@ -5141,7 +5139,6 @@ static int dct_quantize_refine(MpegEncContext *s, //FIXME breaks denoise?
     int prev_run=0;
     int prev_level=0;
     int qmul, qadd, start_i, last_non_zero, i, dc;
-    const int esc_length= s->ac_esc_length;
     uint8_t * length;
     uint8_t * last_length;
     int lambda;
@@ -5249,7 +5246,6 @@ STOP_TIMER("init rem[]")
 #endif
     for(;;){
         int best_score=s->dsp.try_8x8basis(rem, weight, basis[0], 0);
-        int nochange_score= best_score;
         int best_coeff=0;
         int best_change=0;
         int run2, best_unquant_change, analyze_gradient;
index 83f2e42ae1dd0a5719f0927aa0e6591a0bc2da03..00837c8fbb7d3db791249e34346c5bf8b9644db3 100644 (file)
@@ -50,26 +50,26 @@ static int file_open(URLContext *h, const char *filename, int flags)
     fd = open(filename, access, 0666);
     if (fd < 0)
         return -ENOENT;
-    h->priv_data = (void *)fd;
+    h->priv_data = (void *)(size_t)fd;
     return 0;
 }
 
 static int file_read(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return read(fd, buf, size);
 }
 
 static int file_write(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return write(fd, buf, size);
 }
 
 /* XXX: use llseek */
 static offset_t file_seek(URLContext *h, offset_t pos, int whence)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
 #ifdef CONFIG_WIN32
     return _lseeki64(fd, pos, whence);
 #else
@@ -79,7 +79,7 @@ static offset_t file_seek(URLContext *h, offset_t pos, int whence)
 
 static int file_close(URLContext *h)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return close(fd);
 }
 
@@ -106,19 +106,19 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
 #if defined(CONFIG_WIN32) || defined(CONFIG_OS2) || defined(__CYGWIN__)
     setmode(fd, O_BINARY);
 #endif
-    h->priv_data = (void *)fd;
+    h->priv_data = (void *)(size_t)fd;
     return 0;
 }
 
 static int pipe_read(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return read(fd, buf, size);
 }
 
 static int pipe_write(URLContext *h, unsigned char *buf, int size)
 {
-    int fd = (int)h->priv_data;
+    int fd = (size_t)h->priv_data;
     return write(fd, buf, size);
 }
 
index 61b65e489ac1eab342f09d16525fe19d10d470da..ed24c66baea5ea380c7ffd580bb41fc622fe3a96 100644 (file)
@@ -24,6 +24,6 @@ extern FrameHookRelease Release;
 
 extern int frame_hook_add(int argc, char *argv[]);
 extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height);
-extern void frame_hook_release();
+extern void frame_hook_release(void);
 
 #endif
index f8942aee4b88b68656acf7449c86bd3d08efc89f..d36eb0c9cc03e84f2efeeebe5b802621ef282eaf 100644 (file)
@@ -927,7 +927,7 @@ ebml_read_header (MatroskaDemuxContext *matroska,
                     return res;
                 if (num > sizeof(uint32_t)) {
                     av_log(matroska->ctx, AV_LOG_ERROR,
-                           "IDs of size %llu (> %d) not supported\n",
+                           "IDs of size %llu (> %zu) not supported\n",
                            num, sizeof(uint32_t));
                     return AVERROR_INVALIDDATA;
                 }
index b46ea5cf74342f72ff64d13e8b3fb2f3f2eea6b5..86d65b9c390fa6c9dc923aa89bb0cfc4ec1b54f0 100644 (file)
@@ -917,7 +917,7 @@ static int mov_write_header(AVFormatContext *s)
     return 0;
 }
 
-static int Timestamp() {
+static int Timestamp(void) {
     return 1067949799U+(24107*86400); //its the modification time of this line :)
 }
 
index a5cd8dfae158d2853e72b4590d439b267086fb0a..092790c69a3c4278c9466c989abee3bce62b5e2f 100644 (file)
@@ -82,10 +82,10 @@ typedef struct {
 static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
 
 #ifdef CONFIG_ENCODERS
-extern AVOutputFormat mpeg1system_mux;
-extern AVOutputFormat mpeg1vcd_mux;
-extern AVOutputFormat mpeg2vob_mux;
-extern AVOutputFormat mpeg2svcd_mux;
+static AVOutputFormat mpeg1system_mux;
+static AVOutputFormat mpeg1vcd_mux;
+static AVOutputFormat mpeg2vob_mux;
+static AVOutputFormat mpeg2svcd_mux;
 
 static int put_pack_header(AVFormatContext *ctx, 
                            uint8_t *buf, int64_t timestamp)