On Thu, Jul 24, 2014 at 05:03:28PM -0700, Diego Biurrun wrote:
> libavcodec/lcldec.c:165:30: warning: cast discards ‘__attribute__((const))’ 
> qualifier from pointer target type
> ---
>  libavcodec/lcldec.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
> index 4d97948..f2af815 100644
> --- a/libavcodec/lcldec.c
> +++ b/libavcodec/lcldec.c
> @@ -159,10 +159,9 @@ static int zlib_decomp(AVCodecContext *avctx, const 
> uint8_t *src, int src_len, i
>  static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, 
> AVPacket *avpkt)
>  {
>      AVFrame *frame = data;
> -    const uint8_t *buf = avpkt->data;
>      int buf_size = avpkt->size;
>      LclDecContext * const c = avctx->priv_data;
> -    unsigned char *encoded = (unsigned char *)buf;
> +    unsigned char *encoded = avpkt->data;
>      unsigned int pixel_ptr;
>      int row, col;
>      unsigned char *outptr;
> -- 

Here it's even funnier because the same variable is reused in two cases
(otherwise it could've been made const too).
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to