Re: [PATCH 3/4] ll-merge: initialize default_opts const
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Nov 16, 2011, 06:06 UTC
- Message-ID
- <CALkWK0mVxxq0345B_OJQwejpTBD=evOU_iAv39CvXv4mAi=09A@mail.gmail.com>
- In-Reply-To
- <7vty65t1qp.fsf@alter.siamese.dyndns.org>
Hi Junio,
Junio C Hamano wrote:
Show 15 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>> [...]
>> diff --git a/ll-merge.c b/ll-merge.c
>> index da59738..205aed3 100644
>> --- a/ll-merge.c
>> +++ b/ll-merge.c
>> @@ -351,7 +351,7 @@ int ll_merge(mmbuffer_t *result_buf,
>> const struct ll_merge_options *opts)
>> {
>> static struct git_attr_check check[2];
>> - static const struct ll_merge_options default_opts;
>> + static const struct ll_merge_options default_opts = {0, 0, 0, 0};
>
> Doesn't "static" tell us that it will be in BSS, initialized to all zero
> by definition?I'm uncertain about whether the C89 standard says this explicitly- icc is more pedantic than most mainstream compilers. Feel free to drop this part if you don't think it adds value.
Thanks.
-- Ram