patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2] event/dsw: fix gcc 4.8 false positive warning
       [not found] <9833b305-a133-ae09-da8a-8efadd3ca124@ericsson.com>
@ 2020-04-15 18:15 ` Mattias Rönnblom
  0 siblings, 0 replies; only message in thread
From: Mattias Rönnblom @ 2020-04-15 18:15 UTC (permalink / raw)
  To: dev, Jerin Jacob
  Cc: Thomas Monjalon, David Marchand, Mattias Rönnblom, stable

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(-)

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 73a9d38cb..e5e3597aa 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -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)
-- 
2.20.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-15 18:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <9833b305-a133-ae09-da8a-8efadd3ca124@ericsson.com>
2020-04-15 18:15 ` [dpdk-stable] [PATCH v2] event/dsw: fix gcc 4.8 false positive warning Mattias Rönnblom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).