[FFmpeg-devel] [PATCH] Replace all %t print prefixes with macros
michaelni at gmx.at
Wed Aug 22 00:10:35 CEST 2012
On Tue, Aug 21, 2012 at 11:39:37PM +0200, Nicolas George wrote:
> Le quintidi 5 fructidor, an CCXX, Michael Niedermayer a écrit :
> > is there a better identifer in C99 than PRIdPTR for ptrdiff_t ?
> There is "%td", that is exactly that. Just like there is no PRIdLONG since
> that is what "%ld" is for. All this is rather inconsistent¹, but there is
> nothing much we can do about it.
> I do not think that using PRIdPTR will cause any actual problem in any
> actual architecture where ffmpeg works. I just wanted to mention the problem
> for the record. At worst, it may go in the commit message.
> 1: but not completely inconsistent; it is true that ptrdiff_t is a typedef
> as well as intptr_t or int64_t, but they do not have the same status:
> intptr_t and int64_t are services to the programmer, they are never
> necessary and no program will ever produce an intptr_t without explicitly
> requesting it (it may produce a long long int which happens to be the same
> type), while a program will produce a ptrdiff_t each time two pointers are
> subtracted, this is a core feature of the language. End of rant.
but what now with the patch?
"t" amongth others seems disliked by mingw
"warning: unknown conversion type character 't' in format [-Wformat]"
we can either leave it and blame mingw
change to PRIdPTR and hope thats not going to have sideeffects
btw doesnt this add type mismatch warnings somewhere ?
or add our own identifer and set it appropriately depending on target
I have no real preferance but it should be changed in some way that
works on the major platforms
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel