On 9 Oct 2025, at 11:21, Ilya Maximets wrote:

> GCC 4.8 complains for some reason:
>
>   tests/test-psample.c: In function 'run':
>   tests/test-psample.c:217:12:
>     error: missing initializer for field 'packet' of 'struct sample'
>     [-Werror=missing-field-initializers]
>      struct sample sample = {};
>             ^
>
> While it is a little strange to complain, the {} initializer is a C++
> thing and a GNU extension, so we should not be using it.  It's only
> available in C23 standard.
>
> Also, the initialization is not even necessary here, all the fields
> will be initialized later with sample_clear(), as long as it covers
> all the fields (rate was missing).
>
> Fixes: 742de01a4a2e ("tests: Add test-psample testing utility.")
> Signed-off-by: Ilya Maximets <[email protected]>

Acked-by: Eelco Chaudron <[email protected]>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to