[FFmpeg-devel] [PATCH] configure: fix the bigendian test

Martin Storsjö martin at martin.st
Thu Nov 12 00:18:37 EET 2020


On Wed, 11 Nov 2020, David Michael wrote:

> There are two issues:
>
> The unused global integer does not make it into the compiled object
> file, so declare it static to correct this.

Umm, what? That sounds entirely counterintuitive to me.

If the global integer is non-static, it could be referred to by another 
object file, so the compiler cannot omit it from the generated object 
file. On the other side, if the variable is static, the compiler has full 
visibility over any possible use, and sees that nothing in the same object 
file refers to it, and thus can omit it if it's unused.

// Martin



More information about the ffmpeg-devel mailing list