[FFmpeg-devel] [PATCH] libavcodec/wmavoice.c: local variablepow might mask pow function

Eli Friedman eli.friedman
Sun Jul 25 20:49:19 CEST 2010


On Sun, Jul 25, 2010 at 11:24 AM, Axel Holzinger <aholzinger at gmx.de> wrote:
> Hi M?ns et al,
>
> On Sun, Jul 25, 2010 at 7:51 PM, M?ns Rullg?rd:
>> "Axel Holzinger" <aholzinger at gmx.de> writes:
>>
>> > Hi,
>> >
>> > in libavcodec/wmavoice.c local variable float pow (line
>> 585) can mask
>> > pow function if powf (line 595) is a #define and defined
>> for example
>> > like
>> > #define powf(x,y) ? ((float)pow((double)(x), (double)(y)))
>>
>> But we never do that.
>
> No, you don't do that. Why should you?
>
> But some C library implementations do that. How could you know they
> don't?

We "know" because such an implementation wouldn't conform to the
standard... the standard headers aren't allowed to assume that pow
doesn't refer to a local variable.

-Eli



More information about the ffmpeg-devel mailing list