[FFmpeg-devel] [PATCH] Remove two warnings during libavformat build

Diego Biurrun diego
Sun May 4 12:35:35 CEST 2008


On Fri, May 02, 2008 at 06:43:21PM +0100, M?ns Rullg?rd wrote:
> flameeyes at gmail.com (Diego 'Flameeyes' Petten?) writes:
> 
> > Trivial patch, on 64-bit architectures, int and long int have different
> > sizes, and the difference between pointer (ptrdiff_t) is usually mapped
> > on long int. At any rate, %ld should cover all architectures whatever
> > their pointer size, afaict.
> >
> > --- a/libavformat/sdp.c
> > +++ b/libavformat/sdp.c
> > @@ -123,7 +123,7 @@ static char *extradata2psets(AVCodecContext *c)
> >          }
> >          if (av_base64_encode(p, MAX_PSET_SIZE - (p - psets), r, r1 - r) == NULL) {
> > -            av_log(c, AV_LOG_ERROR, "Cannot BASE64 encode %d %d!\n", MAX_PSET_SIZE - (p - psets), r1 - r);
> > +            av_log(c, AV_LOG_ERROR, "Cannot BASE64 encode %ld %ld!\n", MAX_PSET_SIZE - (p - psets), r1 - r);
> 
> %td is the correct format for ptrdiff_t.

Fixed.

Diego




More information about the ffmpeg-devel mailing list