[MPlayer-dev-eng] libmpdemux/cache2.c: correct format strings given _FILE_OFFSET_BITS

a.guru at sympatico.ca a.guru at sympatico.ca
Wed Aug 17 01:58:19 CEST 2005


* On Wednesday 2005-08-17 at 00:46:31 +0200, Reimar Döffinger wrote:
> 
> Umm... just checked, the overhead (on x86) consists of exactly one cdq
> and one push (and if you use (uint64_t) actually one additional push
> _should_ be enough), but compared to the overhead of a function call
> (the mp_msg call), that is hardly relevant.
> mp_msg in a performance-critical place should be in #ifndef NDEBUG
> anyway IMO.

Yes; I don't disagree.
I just like to have looked at all options.
So this thread can be archived for posterity,
once everyone who cares has weighed in,
never to be discussed redundantly again!

Plus, since I run Linux and off_t is already
64-bit there since _FILE_OFFSET_BITS is #defined
to 64, I personally wouldn't be incurring any
overhead myself anyway.  :-)
So will everybody if their off_t is eventually
upgraded to 64-bit, as you mentioned.

So the alternative at this point means hunting
down all places where (uint64_t) should be used.
Because there are mismatches between
printf-formats and actual arguments in the code
right now and either way, these mitmatches have
to be removed/fixed.
As soon as there is a finalized agreement,
I am willing to do this.

PRId64 can so be used as well in that one
"#ifdef __MING32__" place to remove the #ifdef.
All the files that use PRId64 and (uint64_t) can
now #include <inttypes.h> directly themselves,
which in a way is cleanest and most explicit.




More information about the MPlayer-dev-eng mailing list