On 27/05/2024 15:44, Ilya Maximets wrote:
> On 5/27/24 13:00, Roi Dayan via dev wrote:
>> Used Ubuntu with gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
>> lib/netdev-linux.c:4985:54: error: ‘current_speed’ may be used uninitialized
>> in this function [-Werror=maybe-uninitialized]
>>
>> Fixes: b8f8fad86435 ("netdev-linux: Use speed as max rate in tc classes.")
>> Signed-off-by: Roi Dayan <[email protected]>
>> ---
>> lib/netdev-linux.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
>> index 25349c605cdb..0cb379295af1 100644
>> --- a/lib/netdev-linux.c
>> +++ b/lib/netdev-linux.c
>> @@ -4957,7 +4957,7 @@ htb_parse_qdisc_details__(struct netdev *netdev, const
>> struct smap *details,
>> {
>> hc->max_rate = smap_get_ullong(details, "max-rate", 0) / 8;
>> if (!hc->max_rate) {
>> - uint32_t current_speed;
>> + uint32_t current_speed = 0;
>> uint32_t max_speed OVS_UNUSED;
>>
>> netdev_linux_get_speed_locked(netdev_linux_cast(netdev),
>> @@ -5429,7 +5429,7 @@ hfsc_parse_qdisc_details__(struct netdev *netdev,
>> const struct smap *details,
>> {
>> uint32_t max_rate = smap_get_ullong(details, "max-rate", 0) / 8;
>> if (!max_rate) {
>> - uint32_t current_speed;
>> + uint32_t current_speed = 0;
>> uint32_t max_speed OVS_UNUSED;
>>
>> netdev_linux_get_speed_locked(netdev_linux_cast(netdev),
>
> Hi, Roi. Thanks for the patch!
>
> I think it is trying to fix the same issue as:
>
> https://patchwork.ozlabs.org/project/openvswitch/patch/[email protected]/
>
> Best regards, Ilya Maximets.
right. thanks!
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev