On 06.11.2023 14:13, Alejandro Vallejo wrote:
> On Mon, Nov 06, 2023 at 11:29:57AM +0000, Andrew Cooper wrote:
>> On 06/11/2023 10:58 am, Olaf Hering wrote:
>>> Mon,  6 Nov 2023 08:19:46 +0000 Alejandro Vallejo 
>>> <alejandro.vall...@cloud.com>:
>>>
>>>> +    struct xen_sysctl sysctl = {0};
>>> What is that zero doing here? I think a plain {} will do it as well.
>>
>> Indeed.  It needs to be {} and not {0} to compile on some obsolete but
>> still supported versions of GCC.
>>
>> ~Andrew
> I tried to find out what you're talking about and all I could find was:
> 
>   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
> 
> I'm guessing we are already inhibiting that warning because grepping for
> {0} shows a bunch of uses of this pattern both in toolstack and the
> hypervisor. If this breaks something it's already broken.

But it depends on the nature of the structure / union whether old gcc
would have an issue here. Just seeing the pattern in some places doesn't
mean they're also fine to have elsewhere.

Jan

Reply via email to