[v2] event/dsw: fix gcc 4.8 false positive warning
Checks
Commit Message
Add redundant stack variable initialization to work around
false-positive warnings in older versions of GCC.
Fixes: bba7a1aeef46 ("event/dsw: improve migration mechanism")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
drivers/event/dsw/dsw_event.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Wed, Apr 15, 2020 at 8:15 PM Mattias Rönnblom
<mattias.ronnblom@ericsson.com> wrote:
>
> Add redundant stack variable initialization to work around
> false-positive warnings in older versions of GCC.
>
> Fixes: bba7a1aeef46 ("event/dsw: improve migration mechanism")
The commitid in master is 1f2b99e8d.
> Cc: stable@dpdk.org
Original commit is not a fix and is only in master, dropped stable.
Applied directly in master to avoid build failures in the CI.
On 2020-04-15 21:45, David Marchand wrote:
> On Wed, Apr 15, 2020 at 8:15 PM Mattias Rönnblom
> <mattias.ronnblom@ericsson.com> wrote:
>> Add redundant stack variable initialization to work around
>> false-positive warnings in older versions of GCC.
>>
>> Fixes: bba7a1aeef46 ("event/dsw: improve migration mechanism")
> The commitid in master is 1f2b99e8d.
>
>> Cc: stable@dpdk.org
> Original commit is not a fix and is only in master, dropped stable.
>
>
> Applied directly in master to avoid build failures in the CI.
>
Thanks.
@@ -442,10 +442,10 @@ dsw_select_emigration_target(struct dsw_evdev *dsw,
uint8_t *targets_len)
{
int16_t source_port_load = port_loads[source_port_id];
- struct dsw_queue_flow *candidate_qf;
- uint8_t candidate_port_id;
+ struct dsw_queue_flow *candidate_qf = NULL;
+ uint8_t candidate_port_id = 0;
int16_t candidate_weight = -1;
- int16_t candidate_flow_load;
+ int16_t candidate_flow_load = -1;
uint16_t i;
if (source_port_load < DSW_MIN_SOURCE_LOAD_FOR_MIGRATION)