[RFC] ethdev: convert string initialization
Ferruh Yigit
ferruh.yigit at amd.com
Fri Oct 4 19:58:52 CEST 2024
On 10/4/2024 4:17 PM, Stephen Hemminger wrote:
> 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.
>
Thanks for the heads up, I will comment on his patch.
More information about the dev
mailing list