From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 11455A0563; Wed, 15 Apr 2020 20:15:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 679351D9BA; Wed, 15 Apr 2020 20:15:45 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by dpdk.org (Postfix) with ESMTP id DD0211D9B1; Wed, 15 Apr 2020 20:15:43 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id C09C340017; Wed, 15 Apr 2020 20:15:42 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id AD75340016; Wed, 15 Apr 2020 20:15:42 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.2 X-Spam-Score: -0.9 Received: from isengard.friendlyfire.se (host-90-232-146-85.mobileonline.telia.com [90.232.146.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 59FA540002; Wed, 15 Apr 2020 20:15:41 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: dev@dpdk.org, Jerin Jacob Cc: Thomas Monjalon , David Marchand , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , stable@dpdk.org Date: Wed, 15 Apr 2020 20:15:37 +0200 Message-Id: <20200415181537.30087-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <9833b305-a133-ae09-da8a-8efadd3ca124@ericsson.com> References: <9833b305-a133-ae09-da8a-8efadd3ca124@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2] event/dsw: fix gcc 4.8 false positive warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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