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: Eric Blake
Subject: Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning
Date: Tue, 27 Apr 2010 15:42:07 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4

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.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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