[FFmpeg-devel] [PATCH] Remove unused code

Michael Niedermayer michaelni
Sun May 3 02:04:25 CEST 2009


On Fri, May 01, 2009 at 11:50:55PM +0200, Benjamin Larsson wrote:
> Dead assignments found by CSA.
> 
> MvH
> Benjamin Larsson

>  libavcodec/h263.c          |    3 ---
>  libavcodec/lcldec.c        |    1 -
>  libavcodec/mpegvideo_enc.c |    3 ---
>  libavcodec/qtrleenc.c      |    1 -
>  libavcodec/ratecontrol.c   |    1 -
>  libavcodec/sp5xdec.c       |    3 +--
>  libavcodec/vc1.c           |   11 +++--------
>  libavcodec/vp3.c           |    2 --
>  libavcodec/wavpack.c       |    1 -
>  libavformat/matroskadec.c  |    1 -
>  libavformat/mtv.c          |    2 --
>  libavformat/nutdec.c       |    1 -
>  12 files changed, 4 insertions(+), 26 deletions(-)
> 7f18a1dd86549d31555c69334d6c128f3ee9ad5c  CSA_Dead_assignment.diff
[...]
> Index: libavcodec/qtrleenc.c
> ===================================================================
> --- libavcodec/qtrleenc.c	(revision 18726)
> +++ libavcodec/qtrleenc.c	(working copy)
> @@ -200,7 +200,6 @@
>  
>      i=0;
>      this_line = p->               data[0] + line*p->linesize[0];
> -    prev_line = s->previous_frame.data[0] + line*p->linesize[0];
>  
>      if (s->rlecode_table[0] == 0) {
>          bytestream_put_byte(buf, s->skip_table[0] + 1);
> Index: libavcodec/sp5xdec.c
> ===================================================================
> --- libavcodec/sp5xdec.c	(revision 18726)
> +++ libavcodec/sp5xdec.c	(working copy)
> @@ -41,7 +41,7 @@
>      MJpegDecodeContext *s = avctx->priv_data;
>  #endif
>      const int qscale = 5;
> -    const uint8_t *buf_ptr, *buf_end;
> +    const uint8_t *buf_ptr;
>      uint8_t *recoded;
>      int i = 0, j = 0;
>  
> @@ -49,7 +49,6 @@
>          return -1;
>  
>      buf_ptr = buf;
> -    buf_end = buf + buf_size;
>  
>  #if 1
>      recoded = av_mallocz(buf_size + 1024);

these 2 looks ok too

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090503/63cdbf0f/attachment.pgp>



More information about the ffmpeg-devel mailing list