[FFmpeg-devel] [PATCH 1/2] pnm: fix warnings about discarding qualifiers [-Wincompatible-pointer-types]

Michael Niedermayer michaelni at gmx.at
Mon Mar 26 00:29:22 CEST 2012


On Sun, Mar 25, 2012 at 10:55:48AM +0000, Paul B Mahol wrote:
> 
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/pnm.h        |    4 ++--
>  libavcodec/pnm_parser.c |    4 ++--
>  libavcodec/pnmdec.c     |    4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavcodec/pnm.h b/libavcodec/pnm.h
> index ac4b108..71072e7 100644
> --- a/libavcodec/pnm.h
> +++ b/libavcodec/pnm.h
> @@ -26,8 +26,8 @@
>  
>  typedef struct PNMContext {
>      uint8_t *bytestream;
> -    uint8_t *bytestream_start;
> -    uint8_t *bytestream_end;
> +    const uint8_t *bytestream_start;
> +    const uint8_t *bytestream_end;
>      AVFrame picture;
>      int maxval;                 ///< maximum value of a pixel
>      int type;

I think it would be cleaner to have seperate structs for encoder and
decoder. so one can be const and the other not.

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

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120326/d53d2f66/attachment.asc>


More information about the ffmpeg-devel mailing list