[FFmpeg-devel] [PATCH] Replace all %t print prefixes with macros
michaelni at gmx.at
Tue Aug 21 23:26:25 CEST 2012
On Tue, Aug 21, 2012 at 09:31:10AM +0200, Nicolas George wrote:
> Le quintidi 5 fructidor, an CCXX, jamal a écrit :
> > Some C libraries don't support the %t lenght specifier, resulting in print functions
> > outputting said string literally and ignoring the argument
> Can you be a little bit more specific in placing the blame?
> > - av_log(NULL, AV_LOG_DEBUG, "subtitle_packet size=%td\n", q - outbuf);
> > + av_log(NULL, AV_LOG_DEBUG, "subtitle_packet size=%" PRIdPTR "\n", q - outbuf);
> Note that %td is for ptrdiff_t while PRIdPTR is for intptr_t; there is no
> guarantee that they are the same type. In segmented architectures, I guess
> ptrdiff_t would be the size of a near pointer while intptr_t would be the
> size of a far pointer.
> It probably does not change anything on supported architectures, though, but
> I am not completely sure about that.
is there a better identifer in C99 than PRIdPTR for ptrdiff_t ?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel