[RFC] ethdev: convert string initialization
Stephen Hemminger
stephen at networkplumber.org
Fri Oct 4 17:17:17 CEST 2024
On Thu, 1 Aug 2024 02:27:22 -0700
Ferruh Yigit <ferruh.yigit at amd.com> wrote:
> gcc 15 experimental [1], with -Wextra flag, gives warning in variable
> initialization as string [2].
>
> The warning has a point when initialized variable is intended to use as
> string, since assignment is missing the required null terminator for
> this case. But warning is useless for our usecase.
>
> I don't know if this behaviour will change in gcc15, as it is still
> under development. But if not we may need to update our initialization.
>
> In this patch only updated a few instance to show the issue, there are
> many instances to fix, if we prefer to go this way.
> Other option is to disable warning but it can be useful for actual
> string usecases, so I prefer to keep it.
>
> [1]
> gcc (GCC) 15.0.0 20240801 (experimental)
I saw Robin added a bunch more of these in the ipv6 struct changes.
More information about the dev
mailing list