Quoting Diego Biurrun (2016-11-30 22:02:37)
> libavcodec/pnmdec.c:41:19: warning: assignment discards ‘const’ qualifier 
> from pointer target type [-Wdiscarded-qualifiers]
> libavcodec/pnmdec.c:42:23: warning: assignment discards ‘const’ qualifier 
> from pointer target type [-Wdiscarded-qualifiers]
> ---
>  libavcodec/pnmdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
> index d23e2c0..f0c4818 100644
> --- a/libavcodec/pnmdec.c
> +++ b/libavcodec/pnmdec.c
> @@ -29,7 +29,7 @@
>  static int pnm_decode_frame(AVCodecContext *avctx, void *data,
>                              int *got_frame, AVPacket *avpkt)
>  {
> -    const uint8_t *buf   = avpkt->data;
> +    uint8_t *buf         = avpkt->data;
>      int buf_size         = avpkt->size;
>      PNMContext * const s = avctx->priv_data;
>      AVFrame * const p    = data;
> -- 
> 2.1.4

Again, how is it "inappropriate"? The input packet must not be modified
by the decoder, so buf being const is perfectly appropriate.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to