On 2020-04-15 20:07, Mattias Rönnblom wrote: > Add redundant stack variable initialization to work around > false-positive warnings in older versions of GCC. > > Fixes: bba7a1aeef46 ("event/dsw: improve migration mechanism") > Cc: sta...@dpdk.org > > Signed-off-by: Mattias Rönnblom <mattias.ronnb...@ericsson.com> > --- > drivers/event/dsw/dsw_event.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c > index 73a9d38cb..ff5908239 100644 > --- a/drivers/event/dsw/dsw_event.c > +++ b/drivers/event/dsw/dsw_event.c > @@ -443,9 +443,9 @@ dsw_select_emigration_target(struct dsw_evdev *dsw, > { > int16_t source_port_load = port_loads[source_port_id]; > struct dsw_queue_flow *candidate_qf; > - uint8_t candidate_port_id; > + 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)
Too fast a fix. I'll send a v2 where I actually fix all the warnings, not just 2/3 of them.