[Top][All Lists]
[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:18:18 +0200 |
User-agent: |
KMail/1.12.2 (Linux/2.6.31.12-0.1-desktop; KDE/4.3.1; x86_64; ; ) |
On Tuesday 27 April 2010 23:42:07 Eric Blake wrote:
> On 04/27/2010 03:24 PM, Andreas Gruenbacher wrote:
> > * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should
> > have initializer' warning.
> >
> > @@ -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 };
>
> I would have used:
>
> static relative_time const RELATIVE_TIME_0 = { 0 };
> unless that also triggers a stupid warning.
Why, if we have the exact same initializer two lines above?
Thanks,
Andreas