On 09/10/2025 10: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]>
> ---
> tests/test-psample.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Kevin Traynor <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev