[MPlayer-cvslog] r34290 - trunk/configure

Diego Biurrun diego at biurrun.de
Thu Nov 3 22:04:29 CET 2011


On Thu, Nov 03, 2011 at 08:05:49PM +0100, Reimar Döffinger wrote:
> On Thu, Nov 03, 2011 at 03:23:17PM +0100, diego wrote:
> > 
> > Log:
> > configure: add braces to initializer in vsscanf test to shut up a gcc warning
> > 
> > --- trunk/configure	Thu Nov  3 15:23:14 2011	(r34289)
> > +++ trunk/configure	Thu Nov  3 15:23:17 2011	(r34290)
> > @@ -3843,7 +3843,7 @@ cat > $TMPC << EOF
> >  #define _ISOC99_SOURCE
> >  #include <stdarg.h>
> >  #include <stdio.h>
> > -int main(void) { va_list ap = { 0 }; vsscanf("foo", "bar", ap); return 0; }
> > +int main(void) { va_list ap = { { 0 } }; vsscanf("foo", "bar", ap); return 0; }
> 
> I think you've made that kind of mistake before.
> The standard does not make any promises about the layout of va_list.
> Thus your new code can and probably will fail to compile on systems with
> perfectly fine vsscanf support.
> The original code was correct, just not initializing at all would be correct,
> using memset would be correct, going crazy and adding a var-arg function
> and properly using va_start would be too.
> But this one is not.
> No idea which of these do or do not cause warnings.

Thanks for the heads-up, fixed locally, will push in a few.

Diego


More information about the MPlayer-cvslog mailing list