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 58EB8A034E; Thu, 7 Nov 2019 16:04:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59CEC1BF71; Thu, 7 Nov 2019 16:03:37 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 126031BF49 for ; Thu, 7 Nov 2019 16:03:34 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xA7EslQr023773; Thu, 7 Nov 2019 07:03:34 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pfpt0818; bh=WL4awkoCPfA9/PSD7PrvjFy1rcOh+V0LstcbsynwMSo=; b=Pk7IrHH/cfjga0uE+2HlHZFlN2dpXI1rEIGKON7jjgh8eSJYiV2JFIjafTCM5UPaQXtb XcYQSQXlkKU9GWCJWIqdIGGg+tdO1/1nE9Iq+C9ZOQOoSSTRhO6lNsH2jM0bbPDXI4CI wcgnK2cK6QE0TB5Lmtl8bl1+fVai4+nzeJeYiNuh5FlIDQbxlXcr9WZlN63uHtKSHkS6 RfMKUEoAJ65ybt/IH3+W2pE3TttI1a9U1jYo17g2DG05+sFeW7b9zgiWt+EBnXoZMTbi bpIQxNNk73cfolwWi03/WBWhqzDDt5PQGsc2ipeeJJbObNIAlGcaMZKxP/2OoRVSJk2P fw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2w41uwvre1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Nov 2019 07:03:34 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 7 Nov 2019 07:03:33 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 7 Nov 2019 07:03:33 -0800 Received: from amok.marvell.com (unknown [10.95.130.48]) by maili.marvell.com (Postfix) with ESMTP id C97CF3F703F; Thu, 7 Nov 2019 07:03:31 -0800 (PST) From: Andrzej Ostruszka To: , Jerin Jacob CC: , Date: Thu, 7 Nov 2019 16:03:11 +0100 Message-ID: <20191107150318.3677-6-aostruszka@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107150318.3677-1-aostruszka@marvell.com> References: <20191029141212.4907-1-aostruszka@marvell.com> <20191107150318.3677-1-aostruszka@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-07_05:2019-11-07,2019-11-07 signatures=0 Subject: [dpdk-dev] [PATCH v7 05/12] app/eventdev: clean LTO build warnings (maybe-uninitialized) 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" During LTO build compiler reports some 'false positive' warnings about variables being possibly used uninitialized. This patch silences these warnings. Exemplary compiler warning to suppress (with LTO enabled): error: ‘service_id’ may be used uninitialized in this function [-Werror=maybe-uninitialized] ret = evt_service_setup(service_id); Signed-off-by: Andrzej Ostruszka Reviewed-by: Jerin Jacob --- app/test-eventdev/test_perf_common.c | 2 +- app/test-eventdev/test_pipeline_common.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index e24519179..e7cf75a7d 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -439,7 +439,7 @@ perf_event_timer_adapter_setup(struct test_perf *t) if (!(adapter_info.caps & RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) { - uint32_t service_id; + uint32_t service_id = -1U; rte_event_timer_adapter_service_id_get(wl, &service_id); diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 386aca299..160461fb2 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -326,7 +326,7 @@ pipeline_event_rx_adapter_setup(struct evt_options *opt, uint8_t stride, } if (!(cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT)) { - uint32_t service_id; + uint32_t service_id = -1U; rte_event_eth_rx_adapter_service_id_get(prod, &service_id); @@ -378,7 +378,7 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt, } if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) { - uint32_t service_id; + uint32_t service_id = -1U; rte_event_eth_tx_adapter_service_id_get(consm, &service_id); -- 2.17.1