Re: [PATCH 1/2] help: add help_unknown_ref
On 02-05-2013 02:02, Ramkumar Ramachandra wrote:
Show 9 quoted lines
>> ref_cb.similar_refs has already been defined. The compiler won't let me
>> assign to it unless I cast first. However, I think compound literals are a
>> C99/gcc feature. Is this better?
>>
>> struct similar_ref_cb ref_cb = {ref, STRING_LIST_INIT_NODUP};
>
> As Johannes pointed out, ref is a variable and that is problematic.
> Leave the cast on: I didn't notice the compiler warning in my head.
>Is it okay to use a compound literal? It's not supported in C89.