[FFmpeg-devel] [PATCH] silence "may be used uninitialized" warnings
Fri Sep 21 14:14:15 CEST 2007
On Fri, Sep 21, 2007 at 04:53:49AM -0400, Dave Dodge wrote:
> gcc does not have an attribute similar to __unused__ to mark these
> cases. I have no idea why not, as it would seem to be a perfect place
> for one. Instead the usual "solution" is to self-initialize. In fact
> gcc intentionally does _not_ warn about self initialization unless you
> enable -Winit-self, presumably for exactly this reason.
Well in the absence of an authoritative statement that
self-initialization is valid C code, I'm strongly against including
potentially-invalid code for the sake of quieting warnings... If you
include a test in configure (not clear if this can be done however) or
make the macro dependent on gcc, then I won't object.
More information about the ffmpeg-devel