[FFmpeg-devel] [PATCH] Remove only use of compound literals in FFmpeg.
Reimar.Doeffinger at gmx.de
Mon Dec 30 08:28:13 CET 2013
On 30.12.2013, at 07:31, Clément Bœsch <u at pkh.me> wrote:
> On Mon, Dec 30, 2013 at 01:09:17AM +0100, Nicolas George wrote:
>> Le decadi 10 nivôse, an CCXXII, Reimar Döffinger a écrit :
>>> However it still seems to be the only place where we use it?
>> I am afraid not: there is also the av_err2str() magic macro (in
>> lavu/error.h), which is, if I say so myself, really convenient to use
>> instead of the normal functions.
>> I suppose you could implement it using a static array, at the cost of 64
>> extra bytes per use.
It can always be implemented as a local array with no disadvantage, it never does more than avoiding a local variable.
In many cases it does less, since many compilers are unable to place them in .rodata and always build them on stack.
> Same goes for av_ts2str().
Is that function unused? I didn't notice it causing any issue.
I wonder if it's possibly related to e.g. no "const" or being used directly as a function call argument...
I admit I expected to get 100s of errors like that, but strangely this file was the only one with issues...
More information about the ffmpeg-devel