bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' wa


From: Andreas Gruenbacher
Subject: Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning
Date: Wed, 28 Apr 2010 00:25:38 +0200
User-agent: KMail/1.12.2 (Linux/2.6.31.12-0.1-desktop; KDE/4.3.1; x86_64; ; )

On Wednesday 28 April 2010 00:00:35 Bruno Haible wrote:
> Andreas Gruenbacher wrote:
> > diff --git a/lib/getdate.y b/lib/getdate.y
> > index 445865b..dcfe3cc 100644
> > --- a/lib/getdate.y
> > +++ b/lib/getdate.y
> > @@ -152,7 +152,7 @@ typedef struct
> >  #if HAVE_COMPOUND_LITERALS
> >  # define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 })
> >  #else
> > -static relative_time const RELATIVE_TIME_0;
> > +static relative_time const RELATIVE_TIME_0 = { 0, 0, 0, 0, 0, 0, 0 };
> >  #endif
> >
> >  /* Information passed to and from the parser.  */
> 
> This patch makes the code less efficient: An allocation of n bytes in the
> 'data' segment causes n bytes to be read from disk. An allocation of
> n bytes in the 'bss' segment does not.

True, this workaround is probably not worth it then.

Thanks,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]