On 24 Apr 2025, at 13:30, Ilya Maximets wrote:
> Some newer versions of GCC 15 complain:
>
> lib/uuid.c:308:40: error:
> initializer-string for array of 'char' truncates NUL terminator but
> destination lacks 'nonstring' attribute (37 chars into 36 available)
> [-Werror=unterminated-string-initialization]
>
> static const char tmpl[UUID_LEN] = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> We could add 1 to the size or use the attribute, but it seems simpler
> to just convert the template into a const string pointer. There
> shouldn't be any practical difference as the string will be static
> either way.
>
> It's not really a bug, the code is fine as it is, but adding a 'Fixes'
> tag just as a reference for backports.
>
> Fixes: c80eac1f85df ("ovn-controller: Tie OpenFlow and logical flows using
> OpenFlow cookie.")
> Signed-off-by: Ilya Maximets <[email protected]>
Change looks good to me.
Acked-by: Eelco Chaudron <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev