[FFmpeg-devel] [PATCH] silence "may be used uninitialized" warnings
Rich Felker
dalias
Fri Sep 21 07:05:40 CEST 2007
On Fri, Sep 21, 2007 at 01:32:02AM +0200, Diego Biurrun wrote:
> On Thu, Sep 20, 2007 at 11:00:02PM +0200, Aurelien Jacobs wrote:
> >
> > This patch does $subj for 2 warnings.
> > If this is acceptable, this could then be applied to all other such
> > warnings (after carefully verifying that those warnings are really
> > false positives).
> > So is it acceptable ?
> >
> > --- libavutil/common.h (revision 10534)
> > +++ libavutil/common.h (working copy)
> > @@ -77,6 +77,10 @@
> >
> > +#ifndef uninitialized_var
> > +# define uninitialized_var(x) x=x
> > +#endif
The code in this patch is not valid C afaik. Even if it is, the
variable is still used uninitialized in the construct int x=x; If gcc
is not reporting the warning here, it's a bug in gcc's warning
generation. So IMO this workaround has no merit...
Rich
More information about the ffmpeg-devel
mailing list